summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/mx31lite-db.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2011-05-28 21:05:01 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2011-07-07 09:59:57 +0200
commit47e837b54c01083ce153493882fb8d74d108ae4a (patch)
tree96a8da262c733a4e926993653a9dcf5e80387135 /arch/arm/mach-imx/mx31lite-db.c
parentARM: mx5/mx51_babbage: Use gpio_request_array for USBH1 pins (diff)
downloadlinux-47e837b54c01083ce153493882fb8d74d108ae4a.tar.xz
linux-47e837b54c01083ce153493882fb8d74d108ae4a.zip
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.c15
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 = {
/* GPIO LEDs */
-static struct gpio_led litekit_leds[] = {
+static const struct gpio_led litekit_leds[] __initconst = {
{
.name = "GPIO0",
.gpio = IOMUX_TO_GPIO(MX31_PIN_COMPARE),
@@ -176,19 +176,12 @@ static struct gpio_led litekit_leds[] = {
}
};
-static struct gpio_led_platform_data litekit_led_platform_data = {
+static const struct gpio_led_platform_data
+ litekit_led_platform_data __initconst = {
.leds = litekit_leds,
.num_leds = ARRAY_SIZE(litekit_leds),
};
-static struct platform_device litekit_led_device = {
- .name = "leds-gpio",
- .id = -1,
- .dev = {
- .platform_data = &litekit_led_platform_data,
- },
-};
-
void __init mx31lite_db_init(void)
{
mxc_iomux_setup_multiple_pins(litekit_db_board_pins,
@@ -197,7 +190,7 @@ void __init mx31lite_db_init(void)
imx31_add_imx_uart0(&uart_pdata);
imx31_add_mxc_mmc(0, &mmc_pdata);
imx31_add_spi_imx0(&spi0_pdata);
- platform_device_register(&litekit_led_device);
+ gpio_led_register_device(-1, &litekit_led_platform_data);
imx31_add_imx2_wdt(NULL);
imx31_add_mxc_rtc(NULL);
}