aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx5/board-mx51_efikamx.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mx5/board-mx51_efikamx.c')
-rw-r--r--arch/arm/mach-mx5/board-mx51_efikamx.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/arch/arm/mach-mx5/board-mx51_efikamx.c b/arch/arm/mach-mx5/board-mx51_efikamx.c
index 6e362315291b..2400f6d10099 100644
--- a/arch/arm/mach-mx5/board-mx51_efikamx.c
+++ b/arch/arm/mach-mx5/board-mx51_efikamx.c
@@ -139,7 +139,7 @@ static void __init mx51_efikamx_board_id(void)
139 } 139 }
140} 140}
141 141
142static struct gpio_led mx51_efikamx_leds[] = { 142static struct gpio_led mx51_efikamx_leds[] __initdata = {
143 { 143 {
144 .name = "efikamx:green", 144 .name = "efikamx:green",
145 .default_trigger = "default-on", 145 .default_trigger = "default-on",
@@ -157,19 +157,12 @@ static struct gpio_led mx51_efikamx_leds[] = {
157 }, 157 },
158}; 158};
159 159
160static struct gpio_led_platform_data mx51_efikamx_leds_data = { 160static const struct gpio_led_platform_data
161 mx51_efikamx_leds_data __initconst = {
161 .leds = mx51_efikamx_leds, 162 .leds = mx51_efikamx_leds,
162 .num_leds = ARRAY_SIZE(mx51_efikamx_leds), 163 .num_leds = ARRAY_SIZE(mx51_efikamx_leds),
163}; 164};
164 165
165static struct platform_device mx51_efikamx_leds_device = {
166 .name = "leds-gpio",
167 .id = -1,
168 .dev = {
169 .platform_data = &mx51_efikamx_leds_data,
170 },
171};
172
173static struct gpio_keys_button mx51_efikamx_powerkey[] = { 166static struct gpio_keys_button mx51_efikamx_powerkey[] = {
174 { 167 {
175 .code = KEY_POWER, 168 .code = KEY_POWER,
@@ -248,7 +241,7 @@ static void __init mx51_efikamx_init(void)
248 mx51_efikamx_leds[2].default_trigger = "mmc1"; 241 mx51_efikamx_leds[2].default_trigger = "mmc1";
249 } 242 }
250 243
251 platform_device_register(&mx51_efikamx_leds_device); 244 gpio_led_register_device(-1, &mx51_efikamx_leds_data);
252 imx_add_gpio_keys(&mx51_efikamx_powerkey_data); 245 imx_add_gpio_keys(&mx51_efikamx_powerkey_data);
253 246
254 if (system_rev == 0x11) { 247 if (system_rev == 0x11) {