Skip to contentSkip to conversation

drivers: platform: change 0x20 to I8042_STR_AUXDATA in i8042 filters

PATCH Applied Giedrius Statkevicius 2 participants 2 messages Oct 17, 2014 – Oct 21, 2014

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

PATCH 1/1 drivers: platform: change 0x20 to I8042_STR_AUXDATA in i8042 filters

From: Giedrius Statkevičius <[email protected]>

Instead of using a magic constant 0x20 in some drivers to get data only from the KBC port we should use the constant defined in i8042.h with the same value. Also, this makes these drivers uniform with what constant the only other filter function uses in drivers/input/misc/ideapad_slidebar.c.

---
 drivers/platform/x86/dell-laptop.c  | 2 +-
 drivers/platform/x86/msi-laptop.c   | 2 +-
 drivers/platform/x86/toshiba_acpi.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/platform/x86/dell-laptop.c +1 -1
index 233d2ee..60bfc8e 100644
@@ -564,7 +564,7 @@ static bool dell_laptop_i8042_filter(unsigned char data, unsigned char str,
 {
 	static bool extended;
 
-	if (str & 0x20)
+	if (str & I8042_STR_AUXDATA)
 		return false;
 
 	if (unlikely(data == 0xe0)) {
drivers/platform/x86/msi-laptop.c +1 -1
index 62f8030..206a7d9 100644
@@ -821,7 +821,7 @@ static bool msi_laptop_i8042_filter(unsigned char data, unsigned char str,
 {
 	static bool extended;
 
-	if (str & 0x20)
+	if (str & I8042_STR_AUXDATA)
 		return false;
 
 	/* 0x54 wwan, 0x62 bluetooth, 0x76 wlan, 0xE4 touchpad toggle*/
drivers/platform/x86/toshiba_acpi.c +1 -1
index ef3a190..201007b 100644
@@ -1583,7 +1583,7 @@ static umode_t toshiba_sysfs_is_visible(struct kobject *kobj,
 static bool toshiba_acpi_i8042_filter(unsigned char data, unsigned char str,
 				      struct serio *port)
 {
-	if (str & 0x20)
+	if (str & I8042_STR_AUXDATA)
 		return false;
 
 	if (unlikely(data == 0xe0))
Applied
#1 lore raw
Quoted 9 lines · Giedrius Statkevicius

From: Giedrius Statkevičius <[email protected]>

Instead of using a magic constant 0x20 in some drivers to get data only from the KBC port we should use the constant defined in i8042.h with the same value. Also, this makes these drivers uniform with what constant the only other filter function uses in drivers/input/misc/ideapad_slidebar.c.

Queued, thanks Giedrius.

Signature · 2 lines
Darren Hart
Intel Open Source Technology Center