diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index a5dc4ab87fa1..5496482a38c1 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -992,7 +992,7 @@ gpio_keys_disable_wakeup(struct gpio_keys_drvdata *ddata) } } -static int __maybe_unused gpio_keys_suspend(struct device *dev) +static int gpio_keys_suspend(struct device *dev) { struct gpio_keys_drvdata *ddata = dev_get_drvdata(dev); struct input_dev *input = ddata->input; @@ -1012,7 +1012,7 @@ static int __maybe_unused gpio_keys_suspend(struct device *dev) return 0; } -static int __maybe_unused gpio_keys_resume(struct device *dev) +static int gpio_keys_resume(struct device *dev) { struct gpio_keys_drvdata *ddata = dev_get_drvdata(dev); struct input_dev *input = ddata->input; @@ -1034,7 +1034,7 @@ static int __maybe_unused gpio_keys_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(gpio_keys_pm_ops, gpio_keys_suspend, gpio_keys_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(gpio_keys_pm_ops, gpio_keys_suspend, gpio_keys_resume); static void gpio_keys_shutdown(struct platform_device *pdev) { @@ -1050,7 +1050,7 @@ static struct platform_driver gpio_keys_device_driver = { .shutdown = gpio_keys_shutdown, .driver = { .name = "gpio-keys", - .pm = &gpio_keys_pm_ops, + .pm = pm_sleep_ptr(&gpio_keys_pm_ops), .of_match_table = gpio_keys_of_match, .dev_groups = gpio_keys_groups, }