CONFIG_HOTPLUG was removed in Linux kernel 3.11, so remove
the #ifdef in button-hotplug and gpio-button-hotplug kernel modules.

Reported in Trac ticket #16413.

The Patch is untested on kernel version < 3.11

Signed-off-by: Stefan Hellermann <ste...@the2masters.de>
---
 package/kernel/button-hotplug/src/button-hotplug.c           | 4 ++--
 package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/kernel/button-hotplug/src/button-hotplug.c 
b/package/kernel/button-hotplug/src/button-hotplug.c
index 8f84eb1..a11fd46 100644
--- a/package/kernel/button-hotplug/src/button-hotplug.c
+++ b/package/kernel/button-hotplug/src/button-hotplug.c
@@ -208,7 +208,7 @@ static int button_hotplug_create_event(const char *name, 
unsigned long seen,
 
 /* -------------------------------------------------------------------------*/
 
-#ifdef CONFIG_HOTPLUG
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0) ) || defined ( 
CONFIG_HOTPLUG )
 static int button_get_index(unsigned int code)
 {
        int i;
@@ -244,7 +244,7 @@ static void button_hotplug_event(struct input_handle 
*handle,
                           unsigned int type, unsigned int code, int value)
 {
 }
-#endif /* CONFIG_HOTPLUG */
+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0) || 
defined(CONFIG_HOTPLUG) */
 
 static int button_hotplug_connect(struct input_handler *handler,
                struct input_dev *dev, const struct input_device_id *id)
diff --git a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c 
b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
index 6b69d27..4f0ee03 100644
--- a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
+++ b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
@@ -224,7 +224,7 @@ static int button_hotplug_create_event(const char *name, 
unsigned int type,
 
 /* -------------------------------------------------------------------------*/
 
-#ifdef CONFIG_HOTPLUG
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0) ) || defined ( 
CONFIG_HOTPLUG )
 static int button_get_index(unsigned int code)
 {
        int i;
@@ -261,7 +261,7 @@ static void button_hotplug_event(struct 
gpio_keys_button_data *data,
                           unsigned int type, int value)
 {
 }
-#endif /* CONFIG_HOTPLUG */
+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0) || 
defined(CONFIG_HOTPLUG) */
 
 struct gpio_keys_button_dev {
        int polled;
-- 
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to