diff options
Diffstat (limited to 'target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c index 0bf45ad23..f8a2e3d76 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c @@ -12,7 +12,6 @@ #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> @@ -51,7 +50,7 @@ static struct ar71xx_pci_irq wp543_pci_irqs[] __initdata = { } }; -static struct gpio_led wp543_leds_gpio[] = { +static struct gpio_led wp543_leds_gpio[] __initdata = { { .name = "wp543:green:led1", .gpio = WP543_GPIO_LED_1, @@ -75,19 +74,6 @@ static struct gpio_led wp543_leds_gpio[] = { } }; -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)); @@ -99,7 +85,8 @@ static void __init wp543_setup(void) 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); |