Skip to contentSkip to conversation

Convert x86 platform drivers to use sparse keymap library

PATCH In review Dmitry Torokhov 2 participants 7 messages Aug 5, 2010 – Aug 16, 2010

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

cover Convert x86 platform drivers to use sparse keymap library

The following patch series converts several platform drivers that employed their private implementation of sparse keymap to use sparse-keymap library to reduce code duplication.

Please consider applying.

Thanks.

Signature · 1 line
Dmitry
#1 lore raw

PATCH 1/5 topstar-laptop - switch to using sparse keymap library

Instead of implementing its own version of keymap hanlding switch over to using sparse keymap library.

---

 drivers/platform/x86/Kconfig          |    1 
 drivers/platform/x86/topstar-laptop.c |  161 +++++++++++----------------------
 2 files changed, 55 insertions(+), 107 deletions(-)
drivers/platform/x86/Kconfig +1 -0
index 79baa63..63d68e7 100644
@@ -471,6 +471,7 @@ config TOPSTAR_LAPTOP
 	tristate "Topstar Laptop Extras"
 	depends on ACPI
 	depends on INPUT
+	select INPUT_SPARSEKMAP
 	---help---
 	  This driver adds support for hotkeys found on Topstar laptops.
 
drivers/platform/x86/topstar-laptop.c +54 -107

207 lines not on this page · raw message

#2 lore raw

PATCH 2/5 panasonic-laptop - switch to using sparse keymap library

In reply to Dmitry Torokhov

nstead of implementing its own version of keymap hanlding switch over to using sparse keymap library.

---

 drivers/platform/x86/Kconfig            |    1 
 drivers/platform/x86/panasonic-laptop.c |  172 +++++++++++--------------------
 2 files changed, 62 insertions(+), 111 deletions(-)
drivers/platform/x86/Kconfig +1 -0
index 63d68e7..a99d226 100644
@@ -171,6 +171,7 @@ config PANASONIC_LAPTOP
 	tristate "Panasonic Laptop Extras"
 	depends on INPUT && ACPI
 	depends on BACKLIGHT_CLASS_DEVICE
+	select INPUT_SPARSEKMAP
 	---help---
 	  This driver adds support for access to backlight control and hotkeys
 	  on Panasonic Let's Note laptops.
drivers/platform/x86/panasonic-laptop.c +61 -111

253 lines not on this page · raw message

#3 lore raw

PATCH 3/5 Input: dell-wmi - switch to using sparse keymap library

In reply to Dmitry Torokhov

Instead of implementing its own version of keymap hanlding switch over to using sparse keymap library.

---

 drivers/platform/x86/Kconfig    |    1 
 drivers/platform/x86/dell-wmi.c |  256 +++++++++++++++------------------------
 2 files changed, 97 insertions(+), 160 deletions(-)
drivers/platform/x86/Kconfig +1 -0
index a99d226..22cec21 100644
@@ -92,6 +92,7 @@ config DELL_WMI
 	tristate "Dell WMI extras"
 	depends on ACPI_WMI
 	depends on INPUT
+	select INPUT_SPARSEKMAP
 	---help---
 	  Say Y here if you want to support WMI-based hotkeys on Dell laptops.
 
drivers/platform/x86/dell-wmi.c +96 -160

388 lines not on this page · raw message

#4 lore raw

PATCH 4/5 Input: hp-wmi - switch to using sparse keymap library

In reply to Dmitry Torokhov

Instead of implementing its own version of keymap hanlding switch over to using sparse keymap library.

Also make sure that we install notify handler only after we allocated input device and that we remove notify handler before unregistering input device.

---

 drivers/platform/x86/Kconfig  |    1 
 drivers/platform/x86/hp-wmi.c |  172 ++++++++++++-----------------------------
 2 files changed, 52 insertions(+), 121 deletions(-)
drivers/platform/x86/Kconfig +1 -0
index 22cec21..15d5374 100644
@@ -141,6 +141,7 @@ config HP_WMI
 	depends on ACPI_WMI
 	depends on INPUT
 	depends on RFKILL || RFKILL = n
+	select INPUT_SPARSEKMAP
 	help
 	 Say Y here if you want to support WMI-based hotkeys on HP laptops and
 	 to read data from WMI such as docking or ambient light sensor state.
drivers/platform/x86/hp-wmi.c +51 -121

241 lines not on this page · raw message

#5 lore raw

PATCH 5/5 toshiba-acpi - switch to using sparse keymap

In reply to Dmitry Torokhov

Instead of implementing its own version of keymap hanlding switch over to using sparse keymap library.

Also, install notify handler only after we allocated input device, otherwise we may risk getting event too early and crash. Similarly, notify handler should be removed before we unregister input device.

---

 drivers/platform/x86/Kconfig        |    2 
 drivers/platform/x86/toshiba_acpi.c |  191 ++++++++++++-----------------------
 2 files changed, 65 insertions(+), 128 deletions(-)
drivers/platform/x86/Kconfig +1 -1
index 15d5374..b40c15c 100644
@@ -485,7 +485,7 @@ config ACPI_TOSHIBA
 	depends on ACPI
 	depends on INPUT
 	depends on RFKILL || RFKILL = n
-	select INPUT_POLLDEV
+	select INPUT_SPARSEKMAP
 	select BACKLIGHT_CLASS_DEVICE
 	---help---
 	  This driver adds support for access to certain system settings
drivers/platform/x86/toshiba_acpi.c +64 -127

259 lines not on this page · raw message