Skip to content

Commit 496b7d2

Browse files
arndbdtor
authored andcommitted
Input: synaptics - hide unused smbus_pnp_ids[] array
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: e839ffa ("Input: synaptics - add support for Intertouch devices") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20250225145451.1141995-1-arnd@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 564dcfc commit 496b7d2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/input/mouse/synaptics.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ static const char * const topbuttonpad_pnp_ids[] = {
161161
NULL
162162
};
163163

164+
#ifdef CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS
164165
static const char * const smbus_pnp_ids[] = {
165166
/* all of the topbuttonpad_pnp_ids are valid, we just add some extras */
166167
"LEN0048", /* X1 Carbon 3 */
@@ -196,6 +197,7 @@ static const char * const smbus_pnp_ids[] = {
196197
"SYN3257", /* HP Envy 13-ad105ng */
197198
NULL
198199
};
200+
#endif
199201

200202
static const char * const forcepad_pnp_ids[] = {
201203
"SYN300D",

0 commit comments

Comments
 (0)