summaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2011-07-09 12:41:46 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2011-07-10 16:08:32 -0700
commitbdda82162837a20e591ac01b306dc8f052270510 (patch)
treedb5317c0f906897085b81df45ff881ffd8087449 /drivers/input
parentfd05d08920b54d189aa247c5c5701a08e539ed0b (diff)
downloadop-kernel-dev-bdda82162837a20e591ac01b306dc8f052270510.zip
op-kernel-dev-bdda82162837a20e591ac01b306dc8f052270510.tar.gz
Input: gpio_keys - switch to using SIMPLE_DEV_PM_OPS
This reduces amount #ifdeds in the code. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/keyboard/gpio_keys.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index ad11e86..ce281d1 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -693,7 +693,7 @@ static int __devexit gpio_keys_remove(struct platform_device *pdev)
return 0;
}
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
static int gpio_keys_suspend(struct device *dev)
{
struct gpio_keys_drvdata *ddata = dev_get_drvdata(dev);
@@ -731,22 +731,17 @@ static int gpio_keys_resume(struct device *dev)
return 0;
}
-
-static const struct dev_pm_ops gpio_keys_pm_ops = {
- .suspend = gpio_keys_suspend,
- .resume = gpio_keys_resume,
-};
#endif
+static SIMPLE_DEV_PM_OPS(gpio_keys_pm_ops, gpio_keys_suspend, gpio_keys_resume);
+
static struct platform_driver gpio_keys_device_driver = {
.probe = gpio_keys_probe,
.remove = __devexit_p(gpio_keys_remove),
.driver = {
.name = "gpio-keys",
.owner = THIS_MODULE,
-#ifdef CONFIG_PM
.pm = &gpio_keys_pm_ops,
-#endif
.of_match_table = gpio_keys_of_match,
}
};
OpenPOWER on IntegriCloud