From 5309498a56842d0acb723196b7bc57bfb9aee918 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Mon, 28 Feb 2011 18:04:33 +0100 Subject: ARM: imx: use imx_add_gpio_keys to register "gpio-keys" devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit LAKML-Reference: 1302207841-12450-1-git-send-email-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Sascha Hauer --- arch/arm/mach-mx3/mach-armadillo5x0.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'arch/arm/mach-mx3/mach-armadillo5x0.c') 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 @@ #include #include #include -#include #include #include #include @@ -280,20 +279,12 @@ static struct gpio_keys_button armadillo5x0_buttons[] = { } }; -static struct gpio_keys_platform_data armadillo5x0_button_data = { +static const struct gpio_keys_platform_data + armadillo5x0_button_data __initconst = { .buttons = armadillo5x0_buttons, .nbuttons = ARRAY_SIZE(armadillo5x0_buttons), }; -static struct platform_device armadillo5x0_button_device = { - .name = "gpio-keys", - .id = -1, - .num_resources = 0, - .dev = { - .platform_data = &armadillo5x0_button_data, - } -}; - /* * NAND Flash */ @@ -496,7 +487,6 @@ static const struct imxuart_platform_data uart_pdata __initconst = { static struct platform_device *devices[] __initdata = { &armadillo5x0_smc911x_device, - &armadillo5x0_button_device, }; /* @@ -508,6 +498,7 @@ static void __init armadillo5x0_init(void) ARRAY_SIZE(armadillo5x0_pins), "armadillo5x0"); platform_add_devices(devices, ARRAY_SIZE(devices)); + imx_add_gpio_keys(&armadillo5x0_button_data); imx31_add_imx_i2c1(NULL); /* Register UART */ -- cgit v1.2.2