drivers/input/misc/pf1550-onkey.c: fix build with CONFIG_PM_SLEEP=n
Subsystems (3)
PATCH 1/1 drivers/input/misc/pf1550-onkey.c: fix build with CONFIG_PM_SLEEP=n
From: Andrew Morton <[email protected]>
Subject: drivers/input/misc/pf1550-onkey.c: fix build with CONFIG_PM_SLEEP=n
Date: Fri Feb 13 02:39:04 PM PST 2026
riscv randconfig:
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)
| ^~~~~~~~~~~~~~~~~~~~cc1: all warnings being treated as errors
---
drivers/input/misc/pf1550-onkey.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/input/misc/pf1550-onkey.c renamed from drivers/input/misc/pf1550-onkey.c~drivers-input-misc-pf1550-onkeyc-fix-build-with-config_pm_sleep=n +2 -0
@@ -130,6 +130,7 @@ static int pf1550_onkey_probe(struct plareturn 0 ; } +#ifdef CONFIG_PM_SLEEP static int pf1550_onkey_suspend (struct device *dev) {struct platform_device *pdev =to_platform_device (dev);
@@ -175,6 +176,7 @@ static int pf1550_onkey_resume(struct de static SIMPLE_DEV_PM_OPS(pf1550_onkey_pm_ops, pf1550_onkey_suspend, pf1550_onkey_resume); +#endif CONFIG_PM_SLEEP static const struct platform_device_id pf1550_onkey_id[] = { {"pf1550-onkey" , },
_
Dmitry Torokhov
maintainerHi Andrew,
Quoted 6 lines · Andrew Morton
From: Andrew Morton <[email protected]>
Subject:drivers/input/misc/pf1550-onkey.c: fix build withCONFIG_PM_SLEEP=n
Date: Fri Feb 13 02:39:04 PM PST 2026riscv randconfig:
Quoted 7 lines
drivers/input/misc/pf1550-onkey.c:154:12: error: 'pf1550_onkey_resume' defined but not used [-Werror=unused-function]
154 | static intpf1550_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) | ^~~~~~~~~~~~~~~~~~~~cc1: all warnings being treated as errors
Picked the following fix for this:
https://patch.msgid.link/[email protected]
Thanks.
Signature · 1 line
Dmitry