From: Arnd Bergmann Date: Tue, 25 Feb 2025 20:25:35 +0000 (-0800) Subject: Input: synaptics - hide unused smbus_pnp_ids[] array X-Git-Tag: v6.15-rc1~13^2^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=496b7d2e5b936e3e8eae651b51db8a2f9cf0f8b8;p=thirdparty%2Flinux.git 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: e839ffab0289 ("Input: synaptics - add support for Intertouch devices") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20250225145451.1141995-1-arnd@kernel.org Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index aba57abe69788..309c360aab559 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 */ @@ -196,6 +197,7 @@ static const char * const smbus_pnp_ids[] = { "SYN3257", /* HP Envy 13-ad105ng */ NULL }; +#endif static const char * const forcepad_pnp_ids[] = { "SYN300D",