platform/x86: hp-wmi: Introduce HPWMI_POWER_FW_OR_HW as convenient shortcut

For hardware blocked wireless switch we check two bits. Introduce
HPWMI_POWER_FW_OR_HW enum to increase readability and for easier
maintenance.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
This commit is contained in:
Andy Shevchenko 2020-05-15 16:41:04 +03:00
Родитель 5cdc45ed39
Коммит 5c556afebf
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -111,10 +111,10 @@ enum hp_wireless2_bits {
HPWMI_POWER_SOFT = 0x02, HPWMI_POWER_SOFT = 0x02,
HPWMI_POWER_BIOS = 0x04, HPWMI_POWER_BIOS = 0x04,
HPWMI_POWER_HARD = 0x08, HPWMI_POWER_HARD = 0x08,
HPWMI_POWER_FW_OR_HW = HPWMI_POWER_BIOS | HPWMI_POWER_HARD,
}; };
#define IS_HWBLOCKED(x) ((x & (HPWMI_POWER_BIOS | HPWMI_POWER_HARD)) \ #define IS_HWBLOCKED(x) ((x & HPWMI_POWER_FW_OR_HW) != HPWMI_POWER_FW_OR_HW)
!= (HPWMI_POWER_BIOS | HPWMI_POWER_HARD))
#define IS_SWBLOCKED(x) !(x & HPWMI_POWER_SOFT) #define IS_SWBLOCKED(x) !(x & HPWMI_POWER_SOFT)
struct bios_rfkill2_device_state { struct bios_rfkill2_device_state {