drivers: platform: change 0x20 to I8042_STR_AUXDATA in i8042 filters
authorGiedrius Statkevičius <giedriuswork@gmail.com>
Fri, 17 Oct 2014 23:57:20 +0000 (02:57 +0300)
committerDarren Hart <dvhart@linux.intel.com>
Wed, 19 Nov 2014 17:07:07 +0000 (09:07 -0800)
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.

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
drivers/platform/x86/dell-laptop.c
drivers/platform/x86/msi-laptop.c
drivers/platform/x86/toshiba_acpi.c

index 233d2ee598a62cdb5c1b05cc0ef77737cb48f98a..60bfc8ebc541697feffb9094d21df8d003e9cb7c 100644 (file)
@@ -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)) {
index 62f8030b9e77eedf6792a3f173cfbae5eabd4a46..206a7d964d406f01c62d6ecb65c9bdcd5458ec7f 100644 (file)
@@ -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*/
index ab6151f054204c46063ad824b14985c97e3b934c..96076d99cf3365b4558f6ae3887fa080ad5da6b3 100644 (file)
@@ -1589,7 +1589,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))