diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2023-01-14 17:16:17 +0000 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2023-01-27 14:49:53 -0800 |
commit | f31e7388dd1633ed2273cc5c6a99f225ec1a5350 (patch) | |
tree | a3e220a9117c2e60b3b0261fd926985e9027db14 /drivers/input/keyboard | |
parent | 6b9c160853657accdc38c0a24e70ded3547db326 (diff) | |
download | linux-f31e7388dd1633ed2273cc5c6a99f225ec1a5350.tar.gz linux-f31e7388dd1633ed2273cc5c6a99f225ec1a5350.tar.bz2 linux-f31e7388dd1633ed2273cc5c6a99f225ec1a5350.zip |
Input: omap4-keyad - use pm_ptr() and RUNTIME_DEV_PM_OPS()
SET_RUNTIME_DEV_PM_OPS() is deprecated as it requires explicit protection
against unused function warnings. The new combination of pm_ptr()
and RUNTIME_DEV_PM_OPS() allows the compiler to see the functions,
thus suppressing the warning, but still allowing the unused code to be
removed. Thus also drop the __maybe_unused markings.
Note that DEFINE_RUNTIME_DEV_PM_OPS() is not used because that adds
additional callbacks for suspend and resume and would need
testing.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20230114171620.42891-14-jic23@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r-- | drivers/input/keyboard/omap4-keypad.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c index ee9d04a3f0d5..4426120398b0 100644 --- a/drivers/input/keyboard/omap4-keypad.c +++ b/drivers/input/keyboard/omap4-keypad.c @@ -310,7 +310,7 @@ static int omap4_keypad_check_revision(struct device *dev, * Interrupt may not happen for key-up events. We must clear stuck * key-up events after the keyboard hardware has auto-idled. */ -static int __maybe_unused omap4_keypad_runtime_suspend(struct device *dev) +static int omap4_keypad_runtime_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct omap4_keypad *keypad_data = platform_get_drvdata(pdev); @@ -328,7 +328,7 @@ static int __maybe_unused omap4_keypad_runtime_suspend(struct device *dev) } static const struct dev_pm_ops omap4_keypad_pm_ops = { - SET_RUNTIME_PM_OPS(omap4_keypad_runtime_suspend, NULL, NULL) + RUNTIME_PM_OPS(omap4_keypad_runtime_suspend, NULL, NULL) }; static void omap4_disable_pm(void *d) @@ -488,7 +488,7 @@ static struct platform_driver omap4_keypad_driver = { .driver = { .name = "omap4-keypad", .of_match_table = omap_keypad_dt_match, - .pm = &omap4_keypad_pm_ops, + .pm = pm_ptr(&omap4_keypad_pm_ops), }, }; module_platform_driver(omap4_keypad_driver); |