Skip to content

Commit c8084a8

Browse files
eleanorLYJdtor
authored andcommitted
Input: wdt87xx_i2c - fix compiler warning
As reported by the kernel test robot, the following warning occur: >> drivers/input/touchscreen/wdt87xx_i2c.c:1166:36: warning: 'wdt87xx_acpi_id' defined but not used [-Wunused-const-variable=] 1166 | static const struct acpi_device_id wdt87xx_acpi_id[] = { | ^~~~~~~~~~~~~~~ The 'wdt87xx_acpi_id' array is only used when CONFIG_ACPI is enabled. Wrapping its definition and 'MODULE_DEVICE_TABLE' in '#ifdef CONFIG_ACPI' prevents a compiler warning when ACPI is disabled. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202501181549.uzdlBwuN-lkp@intel.com/ Signed-off-by: Yu-Chun Lin <eleanor15x@gmail.com> Link: https://lore.kernel.org/r/20250119084312.1851486-1-eleanor15x@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 25768de commit c8084a8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/input/touchscreen/wdt87xx_i2c.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,11 +1153,13 @@ static const struct i2c_device_id wdt87xx_dev_id[] = {
11531153
};
11541154
MODULE_DEVICE_TABLE(i2c, wdt87xx_dev_id);
11551155

1156+
#ifdef CONFIG_ACPI
11561157
static const struct acpi_device_id wdt87xx_acpi_id[] = {
11571158
{ "WDHT0001", 0 },
11581159
{ }
11591160
};
11601161
MODULE_DEVICE_TABLE(acpi, wdt87xx_acpi_id);
1162+
#endif
11611163

11621164
static struct i2c_driver wdt87xx_driver = {
11631165
.probe = wdt87xx_ts_probe,

0 commit comments

Comments
 (0)