linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: platform: change 0x20 to I8042_STR_AUXDATA in i8042 filters
@ 2014-10-17 23:57 Giedrius Statkevicius
  2014-10-21 20:54 ` Darren Hart
  0 siblings, 1 reply; 2+ messages in thread
From: Giedrius Statkevicius @ 2014-10-17 23:57 UTC (permalink / raw)
  To: dvhart; +Cc: mjg59, jlee, platform-driver-x86, linux-kernel

From: Giedrius Statkevičius <giedriuswork@gmail.com>

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>
---
 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(-)

diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index 233d2ee..60bfc8e 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -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)) {
diff --git a/drivers/platform/x86/msi-laptop.c b/drivers/platform/x86/msi-laptop.c
index 62f8030..206a7d9 100644
--- a/drivers/platform/x86/msi-laptop.c
+++ b/drivers/platform/x86/msi-laptop.c
@@ -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*/
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index ef3a190..201007b 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -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))
-- 



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drivers: platform: change 0x20 to I8042_STR_AUXDATA in i8042 filters
  2014-10-17 23:57 [PATCH] drivers: platform: change 0x20 to I8042_STR_AUXDATA in i8042 filters Giedrius Statkevicius
@ 2014-10-21 20:54 ` Darren Hart
  0 siblings, 0 replies; 2+ messages in thread
From: Darren Hart @ 2014-10-21 20:54 UTC (permalink / raw)
  To: Giedrius Statkevicius; +Cc: mjg59, jlee, platform-driver-x86, linux-kernel

On Sat, Oct 18, 2014 at 02:57:20AM +0300, Giedrius Statkevicius wrote:
> From: Giedrius Statkevičius <giedriuswork@gmail.com>
> 
> 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>

Queued, thanks Giedrius.

-- 
Darren Hart
Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-10-21 20:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-17 23:57 [PATCH] drivers: platform: change 0x20 to I8042_STR_AUXDATA in i8042 filters Giedrius Statkevicius
2014-10-21 20:54 ` Darren Hart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).