[PATCH] Input: pf1550 - convert to DEFINE_SIMPLE_DEV_PM_OPS

From: Arnd Bergmann

Date: Thu Dec 04 2025 - 05:04:30 EST


From: Arnd Bergmann <arnd@xxxxxxxx>

SIMPLE_DEV_PM_OPS() is deprecated and used incorrectly in this new
driver:

drivers/input/misc/pf1550-onkey.c:154:12: error: 'pf1550_onkey_resume' defined but not used [-Werror=unused-function]
154 | static int pf1550_onkey_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~
drivers/input/misc/pf1550-onkey.c:133:12: error: 'pf1550_onkey_suspend' defined but not used [-Werror=unused-function]
133 | static int pf1550_onkey_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~

Convert to the modern DEFINE_SIMPLE_DEV_PM_OPS() that avoids these warnings.

Fixes: 9acb215cbebd ("Input: pf1550 - add onkey support")
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
---
drivers/input/misc/pf1550-onkey.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/misc/pf1550-onkey.c b/drivers/input/misc/pf1550-onkey.c
index 9be6377151cb..a636ceedfc04 100644
--- a/drivers/input/misc/pf1550-onkey.c
+++ b/drivers/input/misc/pf1550-onkey.c
@@ -173,8 +173,8 @@ static int pf1550_onkey_resume(struct device *dev)
return 0;
}

-static SIMPLE_DEV_PM_OPS(pf1550_onkey_pm_ops, pf1550_onkey_suspend,
- pf1550_onkey_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(pf1550_onkey_pm_ops, pf1550_onkey_suspend,
+ pf1550_onkey_resume);

static const struct platform_device_id pf1550_onkey_id[] = {
{ "pf1550-onkey", },
--
2.39.5