Skip to contentSkip to conversation

acer-wmi: fix bitwise bug when set device state

PATCH New Lee, Chun-Yi 1 participant 1 message May 31, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 acer-wmi: fix bitwise bug when set device state

Fix a bitwise bug that was found by Joern Heissler, it must be OR but not AND when we query current device state.

Cc Carlos Corbacho <[email protected]>
Cc Matthew Garrett <[email protected]>
Cc Dmitry Torokhov <[email protected]>
Cc Corentin Chary <[email protected]>
Cc Thomas Renninger <[email protected]>
---
 drivers/platform/x86/acer-wmi.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/platform/x86/acer-wmi.c +3 -3
index 005417b..7d4675a 100644
@@ -1156,9 +1156,9 @@ static acpi_status wmid3_set_device_status(u32 value, u16 device)
 	struct wmid3_gds_input_param params = {
 		.function_num = 0x1,
 		.hotkey_number = 0x01,
-		.devices = ACER_WMID3_GDS_WIRELESS &
-				ACER_WMID3_GDS_THREEG &
-				ACER_WMID3_GDS_WIMAX &
+		.devices = ACER_WMID3_GDS_WIRELESS |
+				ACER_WMID3_GDS_THREEG |
+				ACER_WMID3_GDS_WIMAX |
 				ACER_WMID3_GDS_BLUETOOTH,
 	};
 	struct acpi_buffer input = {
Signature · 1 line
1.6.0.2