Input: gpio_keys: Remove Wakeup Key Handling
Matt Wagner [Thu, 14 Feb 2013 02:29:18 +0000 (18:29 -0800)]
This handling is done elsewhere and doesn't belong in gpio_keys anymore

Bug 1220330

Change-Id: Ibe74f650eedc2f2df93ea8b2c542ba8ad27d9ea2
Signed-off-by: Matt Wagner <mwagner@nvidia.com>
Reviewed-on: http://git-master/r/200642
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

drivers/input/keyboard/gpio_keys.c
include/linux/gpio_keys.h

index b6b305a..3797472 100644 (file)
@@ -4,7 +4,7 @@
  * Copyright 2005 Phil Blundell
  * Copyright 2010, 2011 David Jander <david@protonic.nl>
  *
- * Copyright 2010-2011 NVIDIA Corporation
+ * Copyright 2010-2013 NVIDIA Corporation
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -802,24 +802,12 @@ static int gpio_keys_resume(struct device *dev)
        struct platform_device *pdev = to_platform_device(dev);
        struct gpio_keys_drvdata *ddata = dev_get_drvdata(dev);
        struct gpio_keys_platform_data *pdata = pdev->dev.platform_data;
-       int wakeup_key = KEY_RESERVED;
        int i;
 
-       if (pdata && pdata->wakeup_key)
-               wakeup_key = pdata->wakeup_key();
-
        for (i = 0; i < ddata->n_buttons; i++) {
                struct gpio_button_data *bdata = &ddata->data[i];
                if (bdata->button->wakeup && device_may_wakeup(dev)) {
                        disable_irq_wake(bdata->irq);
-
-                       if (wakeup_key == bdata->button->code) {
-                               unsigned int type = bdata->button->type ?: EV_KEY;
-
-                               input_event(ddata->input, type, bdata->button->code, 1);
-                               input_event(ddata->input, type, bdata->button->code, 0);
-                               input_sync(ddata->input);
-                       }
                }
 
                if (gpio_is_valid(bdata->button->gpio))
index 42530dc..a7e977f 100644 (file)
@@ -26,7 +26,6 @@ struct gpio_keys_platform_data {
        int (*enable)(struct device *dev);
        void (*disable)(struct device *dev);
        const char *name;               /* input device name */
-       int (*wakeup_key)(void);
 };
 
 #endif