Skip to contentSkip to conversation

Input: pf1550 - Remove "defined but unused" warning

PATCH Applied Vaibhav Gupta 4 participants 5 messages Dec 10, 2025 – Jan 22

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Input: pf1550 - Remove "defined but unused" warning

If 'CONFIG_PM_SLEEP' is not set, compiler throws warning for *suspend() and *resume() function for this driver. Using new 'DEFINE_SIMPLE_DEV_PM_OPS' fixes it.

---
 drivers/input/misc/pf1550-onkey.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/misc/pf1550-onkey.c +1 -1
index 9be6377151cb..0d1b570bbe47 100644
@@ -173,7 +173,7 @@ static int pf1550_onkey_resume(struct device *dev)
 	return 0;
 }
 
-static SIMPLE_DEV_PM_OPS(pf1550_onkey_pm_ops, pf1550_onkey_suspend,
+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[] = {
Signature · 1 line
2.51.0
maintainer Applied
#1 lore raw
Quoted 5 lines · Vaibhav Gupta

If 'CONFIG_PM_SLEEP' is not set, compiler throws warning for *suspend() and *resume() function for this driver. Using new 'DEFINE_SIMPLE_DEV_PM_OPS' fixes it.

Applied, thank you.

Signature · 1 line
Dmitry
#2 lore raw

Hi Dmitry,

Quoted 8 lines · Dmitry Torokhov
Quoted 5 lines · Vaibhav Gupta

If 'CONFIG_PM_SLEEP' is not set, compiler throws warning for *suspend() and *resume() function for this driver. Using new 'DEFINE_SIMPLE_DEV_PM_OPS' fixes it.

Applied, thank you.

FTR, Samual submitted a similar patch 6 weeks before, which did take into account alignment of the continuation:
https://lore.kernel.org/all/[email protected]

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
maintainer
#3 lore raw
In reply to Dmitry Torokhov
Quoted 9 lines · Dmitry Torokhov
Quoted 5 lines · Vaibhav Gupta

If 'CONFIG_PM_SLEEP' is not set, compiler throws warning for *suspend() and *resume() function for this driver. Using new 'DEFINE_SIMPLE_DEV_PM_OPS' fixes it.

Applied, thank you.

I think this patch was dropped.

Thanks,
Sam

maintainer
#4 lore raw
Quoted 11 lines · Samuel Kayode
Quoted 9 lines · Dmitry Torokhov
Quoted 5 lines · Vaibhav Gupta

If 'CONFIG_PM_SLEEP' is not set, compiler throws warning for *suspend() and *resume() function for this driver. Using new 'DEFINE_SIMPLE_DEV_PM_OPS' fixes it.

Applied, thank you.

I think this patch was dropped.

I see it in my 'next' branch so it should be in linux-next.

Thanks.

Signature · 1 line
Dmitry