diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2011-02-28 18:04:33 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-05-19 13:11:06 +0200 |
commit | 5309498a56842d0acb723196b7bc57bfb9aee918 (patch) | |
tree | abc5ff4565e8578a229cdc8924775c5ceb6e9b6a /arch/arm/mach-mx5 | |
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-mx5')
-rw-r--r-- | arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c b/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c index e6c1119c20ae..0c80b62ed786 100644 --- a/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c +++ b/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c @@ -27,7 +27,6 @@ #include <linux/irq.h> #include <linux/leds.h> #include <linux/platform_device.h> -#include <linux/gpio_keys.h> #include <linux/input.h> #include <linux/i2c.h> @@ -108,23 +107,14 @@ static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = { }, }; -static struct gpio_keys_platform_data eukrea_mbimxsd_button_data = { +static const struct gpio_keys_platform_data + eukrea_mbimxsd_button_data __initconst = { .buttons = eukrea_mbimxsd_gpio_buttons, .nbuttons = ARRAY_SIZE(eukrea_mbimxsd_gpio_buttons), }; -static struct platform_device eukrea_mbimxsd_button_device = { - .name = "gpio-keys", - .id = -1, - .num_resources = 0, - .dev = { - .platform_data = &eukrea_mbimxsd_button_data, - } -}; - static struct platform_device *platform_devices[] __initdata = { &eukrea_mbimxsd_leds_gpio, - &eukrea_mbimxsd_button_device, }; static const struct imxuart_platform_data uart_pdata __initconst = { @@ -166,4 +156,5 @@ void __init eukrea_mbimxsd51_baseboard_init(void) ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); + imx_add_gpio_keys(&eukrea_mbimxsd_button_data); } |