#include <linux/platform_device.h>
#include <linux/spi/spi.h>
#include <linux/spi/flash.h>
-#include <linux/leds.h>
#include <asm/mips_machine.h>
#include <asm/mach-ar71xx/ar71xx.h>
}
};
-static struct gpio_led wp543_leds_gpio[] = {
+static struct gpio_led wp543_leds_gpio[] __initdata = {
{
.name = "wp543:green:led1",
.gpio = WP543_GPIO_LED_1,
}
};
-static struct gpio_led_platform_data wp543_leds_gpio_data = {
- .leds = wp543_leds_gpio,
- .num_leds = ARRAY_SIZE(wp543_leds_gpio),
-};
-
-static struct platform_device wp543_leds_gpio_device = {
- .name = "leds-gpio",
- .id = -1,
- .dev = {
- .platform_data = &wp543_leds_gpio_data,
- }
-};
-
static void __init wp543_setup(void)
{
ar71xx_add_device_spi(NULL, wp543_spi_info, ARRAY_SIZE(wp543_spi_info));
ar71xx_pci_init(ARRAY_SIZE(wp543_pci_irqs), wp543_pci_irqs);
- platform_device_register(&wp543_leds_gpio_device);
+ ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(wp543_leds_gpio),
+ wp543_leds_gpio);
}
MIPS_MACHINE(MACH_AR71XX_WP543, "Compex WP543", wp543_setup);