Skip to content

Commit f9645f2

Browse files
committed
Input: gpio_keys - annotate PM methods as __maybe_unused
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>
1 parent ea6aabf commit f9645f2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/input/keyboard/gpio_keys.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -814,8 +814,7 @@ static int gpio_keys_remove(struct platform_device *pdev)
814814
return 0;
815815
}
816816

817-
#ifdef CONFIG_PM_SLEEP
818-
static int gpio_keys_suspend(struct device *dev)
817+
static int __maybe_unused gpio_keys_suspend(struct device *dev)
819818
{
820819
struct gpio_keys_drvdata *ddata = dev_get_drvdata(dev);
821820
struct input_dev *input = ddata->input;
@@ -837,7 +836,7 @@ static int gpio_keys_suspend(struct device *dev)
837836
return 0;
838837
}
839838

840-
static int gpio_keys_resume(struct device *dev)
839+
static int __maybe_unused gpio_keys_resume(struct device *dev)
841840
{
842841
struct gpio_keys_drvdata *ddata = dev_get_drvdata(dev);
843842
struct input_dev *input = ddata->input;
@@ -863,7 +862,6 @@ static int gpio_keys_resume(struct device *dev)
863862
gpio_keys_report_state(ddata);
864863
return 0;
865864
}
866-
#endif
867865

868866
static SIMPLE_DEV_PM_OPS(gpio_keys_pm_ops, gpio_keys_suspend, gpio_keys_resume);
869867

0 commit comments

Comments
 (0)