From: Andreas Kemnade <andreas@kemnade.info>
To: dmitry.torokhov@gmail.com, andreas@kemnade.info,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: kernel test robot <lkp@intel.com>
Subject: [PATCH v2] Input: twl4030 - fix warnings without CONFIG_OF
Date: Sat, 27 Dec 2025 12:59:18 +0100 [thread overview]
Message-ID: <20251227115918.76969-1-andreas@kemnade.info> (raw)
There are unused variables without CONFIG_OF:
drivers/input/misc/twl4030-pwrbutton.c:41:44: error: unused variable 'twl4030_chipdata' [-Werror,-Wunused-const-variable]
41 | static const struct twl_pwrbutton_chipdata twl4030_chipdata = {
| ^~~~~~~~~~~~~~~~
drivers/input/misc/twl4030-pwrbutton.c:46:44: error: unused variable 'twl6030_chipdata' [-Werror,-Wunused-const-variable]
46 | static const struct twl_pwrbutton_chipdata twl6030_chipdata = {
Fix that by avoiding some #ifdef CONFIG_OF
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202512220251.jDE8tKup-lkp@intel.com/
Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
Changes in v2:
- replace of.h with proper includes
drivers/input/misc/twl4030-pwrbutton.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c
index d82a3fb28d95..b0feef19515d 100644
--- a/drivers/input/misc/twl4030-pwrbutton.c
+++ b/drivers/input/misc/twl4030-pwrbutton.c
@@ -27,7 +27,8 @@
#include <linux/errno.h>
#include <linux/input.h>
#include <linux/interrupt.h>
-#include <linux/of.h>
+#include <linux/mod_devicetable.h>
+#include <linux/property.h>
#include <linux/platform_device.h>
#include <linux/mfd/twl.h>
@@ -132,7 +133,6 @@ static void twl4030_pwrbutton_remove(struct platform_device *pdev)
}
}
-#ifdef CONFIG_OF
static const struct of_device_id twl4030_pwrbutton_dt_match_table[] = {
{
.compatible = "ti,twl4030-pwrbutton",
@@ -145,14 +145,13 @@ static const struct of_device_id twl4030_pwrbutton_dt_match_table[] = {
{ }
};
MODULE_DEVICE_TABLE(of, twl4030_pwrbutton_dt_match_table);
-#endif
static struct platform_driver twl4030_pwrbutton_driver = {
.probe = twl4030_pwrbutton_probe,
.remove = twl4030_pwrbutton_remove,
.driver = {
.name = "twl4030_pwrbutton",
- .of_match_table = of_match_ptr(twl4030_pwrbutton_dt_match_table),
+ .of_match_table = twl4030_pwrbutton_dt_match_table,
},
};
module_platform_driver(twl4030_pwrbutton_driver);
--
2.47.3
reply other threads:[~2025-12-27 11:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20251227115918.76969-1-andreas@kemnade.info \
--to=andreas@kemnade.info \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.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).