Skip to content

Commit f31e738

Browse files
jic23dtor
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 6b9c160 commit f31e738

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/input/keyboard/omap4-keypad.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ static int omap4_keypad_check_revision(struct device *dev,
310310
* Interrupt may not happen for key-up events. We must clear stuck
311311
* key-up events after the keyboard hardware has auto-idled.
312312
*/
313-
static int __maybe_unused omap4_keypad_runtime_suspend(struct device *dev)
313+
static int omap4_keypad_runtime_suspend(struct device *dev)
314314
{
315315
struct platform_device *pdev = to_platform_device(dev);
316316
struct omap4_keypad *keypad_data = platform_get_drvdata(pdev);
@@ -328,7 +328,7 @@ static int __maybe_unused omap4_keypad_runtime_suspend(struct device *dev)
328328
}
329329

330330
static const struct dev_pm_ops omap4_keypad_pm_ops = {
331-
SET_RUNTIME_PM_OPS(omap4_keypad_runtime_suspend, NULL, NULL)
331+
RUNTIME_PM_OPS(omap4_keypad_runtime_suspend, NULL, NULL)
332332
};
333333

334334
static void omap4_disable_pm(void *d)
@@ -488,7 +488,7 @@ static struct platform_driver omap4_keypad_driver = {
488488
.driver = {
489489
.name = "omap4-keypad",
490490
.of_match_table = omap_keypad_dt_match,
491-
.pm = &omap4_keypad_pm_ops,
491+
.pm = pm_ptr(&omap4_keypad_pm_ops),
492492
},
493493
};
494494
module_platform_driver(omap4_keypad_driver);

0 commit comments

Comments
 (0)