diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2011-05-28 15:05:01 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-07-07 03:59:57 -0400 |
commit | 47e837b54c01083ce153493882fb8d74d108ae4a (patch) | |
tree | 96a8da262c733a4e926993653a9dcf5e80387135 /arch/arm/mach-imx/mx31lite-db.c | |
parent | 72370a5cc28f9efc94a4d7d7dff2ebcb76139088 (diff) |
ARM: imx: convert to new leds-gpio registration helper
This gets rid of per machine struct platform_device definitions and allows
to move the platform data and led definition to .init.rodata.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx/mx31lite-db.c')
-rw-r--r-- | arch/arm/mach-imx/mx31lite-db.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/arch/arm/mach-imx/mx31lite-db.c b/arch/arm/mach-imx/mx31lite-db.c index 5aa053edc17c..bf0fb87946ba 100644 --- a/arch/arm/mach-imx/mx31lite-db.c +++ b/arch/arm/mach-imx/mx31lite-db.c | |||
@@ -161,7 +161,7 @@ static const struct spi_imx_master spi0_pdata __initconst = { | |||
161 | 161 | ||
162 | /* GPIO LEDs */ | 162 | /* GPIO LEDs */ |
163 | 163 | ||
164 | static struct gpio_led litekit_leds[] = { | 164 | static const struct gpio_led litekit_leds[] __initconst = { |
165 | { | 165 | { |
166 | .name = "GPIO0", | 166 | .name = "GPIO0", |
167 | .gpio = IOMUX_TO_GPIO(MX31_PIN_COMPARE), | 167 | .gpio = IOMUX_TO_GPIO(MX31_PIN_COMPARE), |
@@ -176,19 +176,12 @@ static struct gpio_led litekit_leds[] = { | |||
176 | } | 176 | } |
177 | }; | 177 | }; |
178 | 178 | ||
179 | static struct gpio_led_platform_data litekit_led_platform_data = { | 179 | static const struct gpio_led_platform_data |
180 | litekit_led_platform_data __initconst = { | ||
180 | .leds = litekit_leds, | 181 | .leds = litekit_leds, |
181 | .num_leds = ARRAY_SIZE(litekit_leds), | 182 | .num_leds = ARRAY_SIZE(litekit_leds), |
182 | }; | 183 | }; |
183 | 184 | ||
184 | static struct platform_device litekit_led_device = { | ||
185 | .name = "leds-gpio", | ||
186 | .id = -1, | ||
187 | .dev = { | ||
188 | .platform_data = &litekit_led_platform_data, | ||
189 | }, | ||
190 | }; | ||
191 | |||
192 | void __init mx31lite_db_init(void) | 185 | void __init mx31lite_db_init(void) |
193 | { | 186 | { |
194 | mxc_iomux_setup_multiple_pins(litekit_db_board_pins, | 187 | mxc_iomux_setup_multiple_pins(litekit_db_board_pins, |
@@ -197,7 +190,7 @@ void __init mx31lite_db_init(void) | |||
197 | imx31_add_imx_uart0(&uart_pdata); | 190 | imx31_add_imx_uart0(&uart_pdata); |
198 | imx31_add_mxc_mmc(0, &mmc_pdata); | 191 | imx31_add_mxc_mmc(0, &mmc_pdata); |
199 | imx31_add_spi_imx0(&spi0_pdata); | 192 | imx31_add_spi_imx0(&spi0_pdata); |
200 | platform_device_register(&litekit_led_device); | 193 | gpio_led_register_device(-1, &litekit_led_platform_data); |
201 | imx31_add_imx2_wdt(NULL); | 194 | imx31_add_imx2_wdt(NULL); |
202 | imx31_add_mxc_rtc(NULL); | 195 | imx31_add_mxc_rtc(NULL); |
203 | } | 196 | } |