summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3/mach-vpr200.c
diff options
context:
space:
mode:
authorUwe Kleine-König2011-02-28 18:04:33 +0100
committerSascha Hauer2011-05-19 13:11:06 +0200
commit5309498a56842d0acb723196b7bc57bfb9aee918 (patch)
treeabc5ff4565e8578a229cdc8924775c5ceb6e9b6a /arch/arm/mach-mx3/mach-vpr200.c
parentARM: mach-imx: mx25_3ds: add write-protect and card-detect for SD (diff)
downloadkernel-qcow2-linux-5309498a56842d0acb723196b7bc57bfb9aee918.tar.gz
kernel-qcow2-linux-5309498a56842d0acb723196b7bc57bfb9aee918.tar.xz
kernel-qcow2-linux-5309498a56842d0acb723196b7bc57bfb9aee918.zip
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.c12
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[] = {
{KEY_F9, GPIO_BUTTON8, 1, "vpr-keys: F9", 1, VPR_KEY_DEBOUNCE},
};
-static struct gpio_keys_platform_data vpr200_gpio_keys_data = {
+static const struct gpio_keys_platform_data
+ vpr200_gpio_keys_data __initconst = {
.buttons = vpr200_gpio_keys_table,
.nbuttons = ARRAY_SIZE(vpr200_gpio_keys_table),
};
-static struct platform_device vpr200_device_gpiokeys = {
- .name = "gpio-keys",
- .dev = {
- .platform_data = &vpr200_gpio_keys_data,
- }
-};
-
static struct mc13xxx_platform_data vpr200_pmic = {
.flags = MC13XXX_USE_ADC | MC13XXX_USE_TOUCHSCREEN,
};
@@ -271,7 +265,6 @@ static const struct mxc_usbh_platform_data usb_host_pdata __initconst = {
static struct platform_device *devices[] __initdata = {
&vpr200_flash,
- &vpr200_device_gpiokeys,
};
/*
@@ -283,6 +276,7 @@ static void __init vpr200_board_init(void)
imx35_add_fec(NULL);
imx35_add_imx2_wdt(NULL);
+ imx_add_gpio_keys(&vpr200_gpio_keys_data);
platform_add_devices(devices, ARRAY_SIZE(devices));