aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-imx/mach-imx27_visstrim_m10.c')
-rw-r--r--arch/arm/mach-imx/mach-imx27_visstrim_m10.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
index d7e0d219726a..7ae43b1ec517 100644
--- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
+++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
@@ -27,7 +27,6 @@
27#include <linux/mtd/physmap.h> 27#include <linux/mtd/physmap.h>
28#include <linux/i2c.h> 28#include <linux/i2c.h>
29#include <linux/i2c/pca953x.h> 29#include <linux/i2c/pca953x.h>
30#include <linux/gpio_keys.h>
31#include <linux/input.h> 30#include <linux/input.h>
32#include <linux/gpio.h> 31#include <linux/gpio.h>
33#include <linux/delay.h> 32#include <linux/delay.h>
@@ -130,19 +129,12 @@ static struct gpio_keys_button visstrim_gpio_keys[] = {
130 } 129 }
131}; 130};
132 131
133static struct gpio_keys_platform_data visstrim_gpio_keys_platform_data = { 132static const struct gpio_keys_platform_data
133 visstrim_gpio_keys_platform_data __initconst = {
134 .buttons = visstrim_gpio_keys, 134 .buttons = visstrim_gpio_keys,
135 .nbuttons = ARRAY_SIZE(visstrim_gpio_keys), 135 .nbuttons = ARRAY_SIZE(visstrim_gpio_keys),
136}; 136};
137 137
138static struct platform_device visstrim_gpio_keys_device = {
139 .name = "gpio-keys",
140 .id = -1,
141 .dev = {
142 .platform_data = &visstrim_gpio_keys_platform_data,
143 },
144};
145
146/* Visstrim_SM10 has a microSD slot connected to sdhc1 */ 138/* Visstrim_SM10 has a microSD slot connected to sdhc1 */
147static int visstrim_m10_sdhc1_init(struct device *dev, 139static int visstrim_m10_sdhc1_init(struct device *dev,
148 irq_handler_t detect_irq, void *data) 140 irq_handler_t detect_irq, void *data)
@@ -186,7 +178,6 @@ static struct platform_device visstrim_m10_nor_mtd_device = {
186}; 178};
187 179
188static struct platform_device *platform_devices[] __initdata = { 180static struct platform_device *platform_devices[] __initdata = {
189 &visstrim_gpio_keys_device,
190 &visstrim_m10_nor_mtd_device, 181 &visstrim_m10_nor_mtd_device,
191}; 182};
192 183
@@ -255,6 +246,7 @@ static void __init visstrim_m10_board_init(void)
255 imx27_add_mxc_mmc(0, &visstrim_m10_sdhc_pdata); 246 imx27_add_mxc_mmc(0, &visstrim_m10_sdhc_pdata);
256 imx27_add_mxc_ehci_otg(&visstrim_m10_usbotg_pdata); 247 imx27_add_mxc_ehci_otg(&visstrim_m10_usbotg_pdata);
257 imx27_add_fec(NULL); 248 imx27_add_fec(NULL);
249 imx_add_gpio_keys(&visstrim_gpio_keys_platform_data);
258 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 250 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
259} 251}
260 252