Input: gpio_keys - annotate PM methods as __maybe_unused
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 19 Oct 2016 22:38:26 +0000 (15:38 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 8 Nov 2016 00:24:30 +0000 (16:24 -0800)
Instead of using #ifdef, let's mark suspend and resume methods as
__maybe_unused to provide better compile coverage.

Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/gpio_keys.c

index 890eb397d9874eb8dac3de649a137bede572db2f..8f7c20b9cc5c00341fe7763be561eb685f5bd31f 100644 (file)
@@ -814,8 +814,7 @@ static int gpio_keys_remove(struct platform_device *pdev)
        return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
-static int gpio_keys_suspend(struct device *dev)
+static int __maybe_unused gpio_keys_suspend(struct device *dev)
 {
        struct gpio_keys_drvdata *ddata = dev_get_drvdata(dev);
        struct input_dev *input = ddata->input;
@@ -837,7 +836,7 @@ static int gpio_keys_suspend(struct device *dev)
        return 0;
 }
 
-static int gpio_keys_resume(struct device *dev)
+static int __maybe_unused gpio_keys_resume(struct device *dev)
 {
        struct gpio_keys_drvdata *ddata = dev_get_drvdata(dev);
        struct input_dev *input = ddata->input;
@@ -863,7 +862,6 @@ static int gpio_keys_resume(struct device *dev)
        gpio_keys_report_state(ddata);
        return 0;
 }
-#endif
 
 static SIMPLE_DEV_PM_OPS(gpio_keys_pm_ops, gpio_keys_suspend, gpio_keys_resume);