[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240403080702.3509288-9-arnd@kernel.org>
Date: Wed, 3 Apr 2024 10:06:26 +0200
From: Arnd Bergmann <arnd@...nel.org>
To: linux-kernel@...r.kernel.org,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Benjamin Tissoires <benjamin.tissoires@...hat.com>
Cc: Arnd Bergmann <arnd@...db.de>,
José Pekkarinen <jose.pekkarinen@...hound.fi>,
Raul Rangel <rrangel@...omium.org>,
Jeffery Miller <jefferymiller@...gle.com>,
linux-input@...r.kernel.org
Subject: [PATCH 08/34] Input: synaptics: hide unused smbus_pnp_ids[] array
From: Arnd Bergmann <arnd@...db.de>
When SMBUS is disabled, this is never referenced, causing a W=1 warning:
drivers/input/mouse/synaptics.c:164:27: error: 'smbus_pnp_ids' defined but not used [-Werror=unused-const-variable=]
Hide the array behind the same #ifdef as the code referencing it.
Fixes: e839ffab0289 ("Input: synaptics - add support for Intertouch devices")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
drivers/input/mouse/synaptics.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 7a303a9d6bf7..bc22b75e64a7 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -161,6 +161,7 @@ static const char * const topbuttonpad_pnp_ids[] = {
NULL
};
+#ifdef CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS
static const char * const smbus_pnp_ids[] = {
/* all of the topbuttonpad_pnp_ids are valid, we just add some extras */
"LEN0048", /* X1 Carbon 3 */
@@ -195,6 +196,7 @@ static const char * const smbus_pnp_ids[] = {
"SYN3257", /* HP Envy 13-ad105ng */
NULL
};
+#endif
static const char * const forcepad_pnp_ids[] = {
"SYN300D",
--
2.39.2
Powered by blists - more mailing lists