aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2011-02-28 12:04:33 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2011-05-19 07:11:06 -0400
commit5309498a56842d0acb723196b7bc57bfb9aee918 (patch)
treeabc5ff4565e8578a229cdc8924775c5ceb6e9b6a /arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c
parent9c97f66271a09dedfe26a145fceb74c6efd83571 (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/eukrea_mbimxsd-baseboard.c')
-rw-r--r--arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c15
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 @@
27#include <linux/irq.h> 27#include <linux/irq.h>
28#include <linux/leds.h> 28#include <linux/leds.h>
29#include <linux/platform_device.h> 29#include <linux/platform_device.h>
30#include <linux/gpio_keys.h>
31#include <linux/input.h> 30#include <linux/input.h>
32#include <linux/i2c.h> 31#include <linux/i2c.h>
33 32
@@ -108,23 +107,14 @@ static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = {
108 }, 107 },
109}; 108};
110 109
111static struct gpio_keys_platform_data eukrea_mbimxsd_button_data = { 110static const struct gpio_keys_platform_data
111 eukrea_mbimxsd_button_data __initconst = {
112 .buttons = eukrea_mbimxsd_gpio_buttons, 112 .buttons = eukrea_mbimxsd_gpio_buttons,
113 .nbuttons = ARRAY_SIZE(eukrea_mbimxsd_gpio_buttons), 113 .nbuttons = ARRAY_SIZE(eukrea_mbimxsd_gpio_buttons),
114}; 114};
115 115
116static struct platform_device eukrea_mbimxsd_button_device = {
117 .name = "gpio-keys",
118 .id = -1,
119 .num_resources = 0,
120 .dev = {
121 .platform_data = &eukrea_mbimxsd_button_data,
122 }
123};
124
125static struct platform_device *platform_devices[] __initdata = { 116static struct platform_device *platform_devices[] __initdata = {
126 &eukrea_mbimxsd_leds_gpio, 117 &eukrea_mbimxsd_leds_gpio,
127 &eukrea_mbimxsd_button_device,
128}; 118};
129 119
130static const struct imxuart_platform_data uart_pdata __initconst = { 120static const struct imxuart_platform_data uart_pdata __initconst = {
@@ -166,4 +156,5 @@ void __init eukrea_mbimxsd51_baseboard_init(void)
166 ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); 156 ARRAY_SIZE(eukrea_mbimxsd_i2c_devices));
167 157
168 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 158 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
159 imx_add_gpio_keys(&eukrea_mbimxsd_button_data);
169} 160}