aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3/mach-pcm037_eet.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mx3/mach-pcm037_eet.c')
-rw-r--r--arch/arm/mach-mx3/mach-pcm037_eet.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/arch/arm/mach-mx3/mach-pcm037_eet.c b/arch/arm/mach-mx3/mach-pcm037_eet.c
index df6fb07d037e..3f81e357affb 100644
--- a/arch/arm/mach-mx3/mach-pcm037_eet.c
+++ b/arch/arm/mach-mx3/mach-pcm037_eet.c
@@ -7,7 +7,6 @@
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 */ 8 */
9#include <linux/gpio.h> 9#include <linux/gpio.h>
10#include <linux/gpio_keys.h>
11#include <linux/input.h> 10#include <linux/input.h>
12#include <linux/platform_device.h> 11#include <linux/platform_device.h>
13#include <linux/spi/spi.h> 12#include <linux/spi/spi.h>
@@ -156,20 +155,13 @@ static struct gpio_keys_button pcm037_gpio_keys[] = {
156 }, 155 },
157}; 156};
158 157
159static struct gpio_keys_platform_data pcm037_gpio_keys_platform_data = { 158static const struct gpio_keys_platform_data
159 pcm037_gpio_keys_platform_data __initconst = {
160 .buttons = pcm037_gpio_keys, 160 .buttons = pcm037_gpio_keys,
161 .nbuttons = ARRAY_SIZE(pcm037_gpio_keys), 161 .nbuttons = ARRAY_SIZE(pcm037_gpio_keys),
162 .rep = 0, /* No auto-repeat */ 162 .rep = 0, /* No auto-repeat */
163}; 163};
164 164
165static struct platform_device pcm037_gpio_keys_device = {
166 .name = "gpio-keys",
167 .id = -1,
168 .dev = {
169 .platform_data = &pcm037_gpio_keys_platform_data,
170 },
171};
172
173static int __init eet_init_devices(void) 165static int __init eet_init_devices(void)
174{ 166{
175 if (!machine_is_pcm037() || pcm037_variant() != PCM037_EET) 167 if (!machine_is_pcm037() || pcm037_variant() != PCM037_EET)
@@ -182,9 +174,8 @@ static int __init eet_init_devices(void)
182 spi_register_board_info(pcm037_spi_dev, ARRAY_SIZE(pcm037_spi_dev)); 174 spi_register_board_info(pcm037_spi_dev, ARRAY_SIZE(pcm037_spi_dev));
183 imx31_add_spi_imx0(&pcm037_spi1_pdata); 175 imx31_add_spi_imx0(&pcm037_spi1_pdata);
184 176
185 platform_device_register(&pcm037_gpio_keys_device); 177 imx_add_gpio_keys(&pcm037_gpio_keys_platform_data);
186 178
187 return 0; 179 return 0;
188} 180}
189
190late_initcall(eet_init_devices); 181late_initcall(eet_init_devices);