config LEDS_NIC78BX
tristate "LED support for NI PXI NIC78bx devices"
depends on LEDS_CLASS
- depends on X86 && ACPI
+ depends on HAS_IOPORT
+ depends on X86 || COMPILE_TEST
help
This option enables support for the User1 and User2 LEDs on NI
PXI NIC78bx devices.
* Copyright (C) 2016 National Instruments Corp.
*/
-#include <linux/acpi.h>
+#include <linux/array_size.h>
+#include <linux/bits.h>
+#include <linux/container_of.h>
+#include <linux/device.h>
+#include <linux/errno.h>
+#include <linux/io.h>
+#include <linux/ioport.h>
#include <linux/leds.h>
+#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/spinlock.h>
+#include <linux/types.h>
#define NIC78BX_USER1_LED_MASK 0x3
#define NIC78BX_USER1_GREEN_LED BIT(0)
}
static const struct acpi_device_id led_device_ids[] = {
- {"NIC78B3", 0},
- {"", 0},
+ { "NIC78B3" },
+ { }
};
MODULE_DEVICE_TABLE(acpi, led_device_ids);
.probe = nic78bx_probe,
.driver = {
.name = KBUILD_MODNAME,
- .acpi_match_table = ACPI_PTR(led_device_ids),
+ .acpi_match_table = led_device_ids,
},
};