diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2011-02-28 12:04:33 -0500 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-05-19 07:11:06 -0400 |
commit | 5309498a56842d0acb723196b7bc57bfb9aee918 (patch) | |
tree | abc5ff4565e8578a229cdc8924775c5ceb6e9b6a /arch/arm/mach-mx3/mach-armadillo5x0.c | |
parent | 9c97f66271a09dedfe26a145fceb74c6efd83571 (diff) |
ARM: imx: use imx_add_gpio_keys to register "gpio-keys" devices
LAKML-Reference: 1302207841-12450-1-git-send-email-u.kleine-koenig@pengutronix.de
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-mx3/mach-armadillo5x0.c')
-rw-r--r-- | arch/arm/mach-mx3/mach-armadillo5x0.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/arch/arm/mach-mx3/mach-armadillo5x0.c b/arch/arm/mach-mx3/mach-armadillo5x0.c index 226829bf7c25..ace0c4c3b662 100644 --- a/arch/arm/mach-mx3/mach-armadillo5x0.c +++ b/arch/arm/mach-mx3/mach-armadillo5x0.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <linux/mtd/physmap.h> | 34 | #include <linux/mtd/physmap.h> |
35 | #include <linux/io.h> | 35 | #include <linux/io.h> |
36 | #include <linux/input.h> | 36 | #include <linux/input.h> |
37 | #include <linux/gpio_keys.h> | ||
38 | #include <linux/i2c.h> | 37 | #include <linux/i2c.h> |
39 | #include <linux/usb/otg.h> | 38 | #include <linux/usb/otg.h> |
40 | #include <linux/usb/ulpi.h> | 39 | #include <linux/usb/ulpi.h> |
@@ -280,20 +279,12 @@ static struct gpio_keys_button armadillo5x0_buttons[] = { | |||
280 | } | 279 | } |
281 | }; | 280 | }; |
282 | 281 | ||
283 | static struct gpio_keys_platform_data armadillo5x0_button_data = { | 282 | static const struct gpio_keys_platform_data |
283 | armadillo5x0_button_data __initconst = { | ||
284 | .buttons = armadillo5x0_buttons, | 284 | .buttons = armadillo5x0_buttons, |
285 | .nbuttons = ARRAY_SIZE(armadillo5x0_buttons), | 285 | .nbuttons = ARRAY_SIZE(armadillo5x0_buttons), |
286 | }; | 286 | }; |
287 | 287 | ||
288 | static struct platform_device armadillo5x0_button_device = { | ||
289 | .name = "gpio-keys", | ||
290 | .id = -1, | ||
291 | .num_resources = 0, | ||
292 | .dev = { | ||
293 | .platform_data = &armadillo5x0_button_data, | ||
294 | } | ||
295 | }; | ||
296 | |||
297 | /* | 288 | /* |
298 | * NAND Flash | 289 | * NAND Flash |
299 | */ | 290 | */ |
@@ -496,7 +487,6 @@ static const struct imxuart_platform_data uart_pdata __initconst = { | |||
496 | 487 | ||
497 | static struct platform_device *devices[] __initdata = { | 488 | static struct platform_device *devices[] __initdata = { |
498 | &armadillo5x0_smc911x_device, | 489 | &armadillo5x0_smc911x_device, |
499 | &armadillo5x0_button_device, | ||
500 | }; | 490 | }; |
501 | 491 | ||
502 | /* | 492 | /* |
@@ -508,6 +498,7 @@ static void __init armadillo5x0_init(void) | |||
508 | ARRAY_SIZE(armadillo5x0_pins), "armadillo5x0"); | 498 | ARRAY_SIZE(armadillo5x0_pins), "armadillo5x0"); |
509 | 499 | ||
510 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 500 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
501 | imx_add_gpio_keys(&armadillo5x0_button_data); | ||
511 | imx31_add_imx_i2c1(NULL); | 502 | imx31_add_imx_i2c1(NULL); |
512 | 503 | ||
513 | /* Register UART */ | 504 | /* Register UART */ |