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-vpr200.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-vpr200.c')
-rw-r--r-- | arch/arm/mach-mx3/mach-vpr200.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/arch/arm/mach-mx3/mach-vpr200.c b/arch/arm/mach-mx3/mach-vpr200.c index 47a69cbc31a8..d7d190eacdcd 100644 --- a/arch/arm/mach-mx3/mach-vpr200.c +++ b/arch/arm/mach-mx3/mach-vpr200.c | |||
@@ -141,18 +141,12 @@ static struct gpio_keys_button vpr200_gpio_keys_table[] = { | |||
141 | {KEY_F9, GPIO_BUTTON8, 1, "vpr-keys: F9", 1, VPR_KEY_DEBOUNCE}, | 141 | {KEY_F9, GPIO_BUTTON8, 1, "vpr-keys: F9", 1, VPR_KEY_DEBOUNCE}, |
142 | }; | 142 | }; |
143 | 143 | ||
144 | static struct gpio_keys_platform_data vpr200_gpio_keys_data = { | 144 | static const struct gpio_keys_platform_data |
145 | vpr200_gpio_keys_data __initconst = { | ||
145 | .buttons = vpr200_gpio_keys_table, | 146 | .buttons = vpr200_gpio_keys_table, |
146 | .nbuttons = ARRAY_SIZE(vpr200_gpio_keys_table), | 147 | .nbuttons = ARRAY_SIZE(vpr200_gpio_keys_table), |
147 | }; | 148 | }; |
148 | 149 | ||
149 | static struct platform_device vpr200_device_gpiokeys = { | ||
150 | .name = "gpio-keys", | ||
151 | .dev = { | ||
152 | .platform_data = &vpr200_gpio_keys_data, | ||
153 | } | ||
154 | }; | ||
155 | |||
156 | static struct mc13xxx_platform_data vpr200_pmic = { | 150 | static struct mc13xxx_platform_data vpr200_pmic = { |
157 | .flags = MC13XXX_USE_ADC | MC13XXX_USE_TOUCHSCREEN, | 151 | .flags = MC13XXX_USE_ADC | MC13XXX_USE_TOUCHSCREEN, |
158 | }; | 152 | }; |
@@ -271,7 +265,6 @@ static const struct mxc_usbh_platform_data usb_host_pdata __initconst = { | |||
271 | 265 | ||
272 | static struct platform_device *devices[] __initdata = { | 266 | static struct platform_device *devices[] __initdata = { |
273 | &vpr200_flash, | 267 | &vpr200_flash, |
274 | &vpr200_device_gpiokeys, | ||
275 | }; | 268 | }; |
276 | 269 | ||
277 | /* | 270 | /* |
@@ -283,6 +276,7 @@ static void __init vpr200_board_init(void) | |||
283 | 276 | ||
284 | imx35_add_fec(NULL); | 277 | imx35_add_fec(NULL); |
285 | imx35_add_imx2_wdt(NULL); | 278 | imx35_add_imx2_wdt(NULL); |
279 | imx_add_gpio_keys(&vpr200_gpio_keys_data); | ||
286 | 280 | ||
287 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 281 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
288 | 282 | ||