From: Vaibhav Gupta <vaibhavgupta40@gmail.com>
To: Samuel Kayode <samkay014@gmail.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Vaibhav Gupta <vaibhavgupta40@gmail.com>,
imx@lists.linux.dev, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v1] Input: pf1550 - Remove "defined but unused" warning
Date: Wed, 10 Dec 2025 21:11:41 +0000 [thread overview]
Message-ID: <20251210211149.543928-1-vaibhavgupta40@gmail.com> (raw)
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.
Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
---
drivers/input/misc/pf1550-onkey.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/misc/pf1550-onkey.c b/drivers/input/misc/pf1550-onkey.c
index 9be6377151cb..0d1b570bbe47 100644
--- a/drivers/input/misc/pf1550-onkey.c
+++ b/drivers/input/misc/pf1550-onkey.c
@@ -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[] = {
--
2.51.0
next reply other threads:[~2025-12-10 21:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-10 21:11 Vaibhav Gupta [this message]
2025-12-13 9:38 ` [PATCH v1] Input: pf1550 - Remove "defined but unused" warning Dmitry Torokhov
2025-12-15 9:21 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251210211149.543928-1-vaibhavgupta40@gmail.com \
--to=vaibhavgupta40@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=imx@lists.linux.dev \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=samkay014@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).