linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [v2] Input: stmpe-ts - mark OF related data as maybe unused
@ 2025-02-25 14:53 Arnd Bergmann
  2025-02-25 15:47 ` Uwe Kleine-König
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2025-02-25 14:53 UTC (permalink / raw)
  To: Dmitry Torokhov, Maxime Coquelin, Alexandre Torgue
  Cc: Krzysztof Kozlowski, Arnd Bergmann, Yu Jiaoliang, Oliver Graute,
	Uwe Kleine-König, linux-input, linux-stm32, linux-arm-kernel,
	linux-kernel

From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

When compile tested with W=1 on x86_64 with driver as built-in:

  stmpe-ts.c:371:34: error: unused variable 'stmpe_ts_ids' [-Werror,-Wunused-const-variable]

Ideally this would be referenced from the platform_driver, but since
the compatible string is already matched by the mfd driver for its
parent device, that would break probing.

In this case, the of_device_id table just serves as a module alias
for loading the driver, while the device itself is probed using
the platform device name.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/lkml/20240403080702.3509288-8-arnd@kernel.org/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/input/touchscreen/stmpe-ts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/touchscreen/stmpe-ts.c b/drivers/input/touchscreen/stmpe-ts.c
index a94a1997f96b..3900aa2e3a90 100644
--- a/drivers/input/touchscreen/stmpe-ts.c
+++ b/drivers/input/touchscreen/stmpe-ts.c
@@ -366,7 +366,7 @@ static struct platform_driver stmpe_ts_driver = {
 };
 module_platform_driver(stmpe_ts_driver);
 
-static const struct of_device_id stmpe_ts_ids[] = {
+static const struct of_device_id stmpe_ts_ids[] __maybe_unused = {
 	{ .compatible = "st,stmpe-ts", },
 	{ },
 };
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-02-25 21:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-25 14:53 [PATCH] [v2] Input: stmpe-ts - mark OF related data as maybe unused Arnd Bergmann
2025-02-25 15:47 ` Uwe Kleine-König
2025-02-25 16:25   ` Arnd Bergmann
2025-02-25 20:17     ` Uwe Kleine-König
2025-02-25 21:27       ` Arnd Bergmann

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).