diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2008-09-07 08:59:27 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2008-09-07 08:59:27 +0000 |
commit | dd8499cc2687d8c2df064054627c498402c64ed0 (patch) | |
tree | 3168263b6505914f1f57835f80724558d81d46cc /target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c | |
parent | 243904d49670e2870b3dbe7066b902339d90158d (diff) | |
download | mtk-20170518-dd8499cc2687d8c2df064054627c498402c64ed0.zip mtk-20170518-dd8499cc2687d8c2df064054627c498402c64ed0.tar.gz mtk-20170518-dd8499cc2687d8c2df064054627c498402c64ed0.tar.bz2 |
simplify leds-gpio device registration
SVN-Revision: 12543
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 0bf45ad..f8a2e3d 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); |