Skip to content

Commit 5c556af

Browse files
committed
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 <[email protected]>
1 parent 5cdc45e commit 5c556af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/platform/x86/hp-wmi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ enum hp_wireless2_bits {
111111
HPWMI_POWER_SOFT = 0x02,
112112
HPWMI_POWER_BIOS = 0x04,
113113
HPWMI_POWER_HARD = 0x08,
114+
HPWMI_POWER_FW_OR_HW = HPWMI_POWER_BIOS | HPWMI_POWER_HARD,
114115
};
115116

116-
#define IS_HWBLOCKED(x) ((x & (HPWMI_POWER_BIOS | HPWMI_POWER_HARD)) \
117-
!= (HPWMI_POWER_BIOS | HPWMI_POWER_HARD))
117+
#define IS_HWBLOCKED(x) ((x & HPWMI_POWER_FW_OR_HW) != HPWMI_POWER_FW_OR_HW)
118118
#define IS_SWBLOCKED(x) !(x & HPWMI_POWER_SOFT)
119119

120120
struct bios_rfkill2_device_state {

0 commit comments

Comments
 (0)