Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

watchdog: nic7018_wdt: tidy up ACPI ID table

Tidy up ACPI ID table:
- drop ACPI_PTR() and hence replace acpi.h with mod_devicetable.h
- remove explicit driver_data initializer
- drop comma in the terminator entry

With that done, extend compile test coverage.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20250304140114.1812452-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>

authored by

Andy Shevchenko and committed by
Wim Van Sebroeck
f1c16aa6 480ee8a2

+7 -5
+2 -1
drivers/watchdog/Kconfig
··· 1743 1743 1744 1744 config NIC7018_WDT 1745 1745 tristate "NIC7018 Watchdog" 1746 - depends on X86 && ACPI 1746 + depends on HAS_IOPORT 1747 + depends on ACPI || COMPILE_TEST 1747 1748 select WATCHDOG_CORE 1748 1749 help 1749 1750 Support for National Instruments NIC7018 Watchdog.
+5 -4
drivers/watchdog/nic7018_wdt.c
··· 3 3 * Copyright (C) 2016 National Instruments Corp. 4 4 */ 5 5 6 - #include <linux/acpi.h> 7 6 #include <linux/bitops.h> 8 7 #include <linux/device.h> 9 8 #include <linux/io.h> 9 + #include <linux/mod_devicetable.h> 10 10 #include <linux/module.h> 11 11 #include <linux/platform_device.h> 12 + #include <linux/types.h> 12 13 #include <linux/watchdog.h> 13 14 14 15 #define LOCK 0xA5 ··· 230 229 } 231 230 232 231 static const struct acpi_device_id nic7018_device_ids[] = { 233 - {"NIC7018", 0}, 234 - {"", 0}, 232 + { "NIC7018" }, 233 + { } 235 234 }; 236 235 MODULE_DEVICE_TABLE(acpi, nic7018_device_ids); 237 236 ··· 240 239 .remove = nic7018_remove, 241 240 .driver = { 242 241 .name = KBUILD_MODNAME, 243 - .acpi_match_table = ACPI_PTR(nic7018_device_ids), 242 + .acpi_match_table = nic7018_device_ids, 244 243 }, 245 244 }; 246 245