Skip to content

Commit f1c16aa

Browse files
andy-shevWim Van Sebroeck
authored andcommitted
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 <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
1 parent 480ee8a commit f1c16aa

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

drivers/watchdog/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1743,7 +1743,8 @@ config NI903X_WDT
17431743

17441744
config NIC7018_WDT
17451745
tristate "NIC7018 Watchdog"
1746-
depends on X86 && ACPI
1746+
depends on HAS_IOPORT
1747+
depends on ACPI || COMPILE_TEST
17471748
select WATCHDOG_CORE
17481749
help
17491750
Support for National Instruments NIC7018 Watchdog.

drivers/watchdog/nic7018_wdt.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
* Copyright (C) 2016 National Instruments Corp.
44
*/
55

6-
#include <linux/acpi.h>
76
#include <linux/bitops.h>
87
#include <linux/device.h>
98
#include <linux/io.h>
9+
#include <linux/mod_devicetable.h>
1010
#include <linux/module.h>
1111
#include <linux/platform_device.h>
12+
#include <linux/types.h>
1213
#include <linux/watchdog.h>
1314

1415
#define LOCK 0xA5
@@ -229,8 +230,8 @@ static void nic7018_remove(struct platform_device *pdev)
229230
}
230231

231232
static const struct acpi_device_id nic7018_device_ids[] = {
232-
{"NIC7018", 0},
233-
{"", 0},
233+
{ "NIC7018" },
234+
{ }
234235
};
235236
MODULE_DEVICE_TABLE(acpi, nic7018_device_ids);
236237

@@ -239,7 +240,7 @@ static struct platform_driver watchdog_driver = {
239240
.remove = nic7018_remove,
240241
.driver = {
241242
.name = KBUILD_MODNAME,
242-
.acpi_match_table = ACPI_PTR(nic7018_device_ids),
243+
.acpi_match_table = nic7018_device_ids,
243244
},
244245
};
245246

0 commit comments

Comments
 (0)