]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap2/board-3430sdp.c
i2c: move twl4030_keypad to new style registration
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap2 / board-3430sdp.c
index 4c60d7b4301fb62a804ae0875f0b4a1a1a0612a9..fe1ba4e87675154588bd0638d33f1b9b126539ce 100644 (file)
@@ -110,7 +110,7 @@ static int sdp3430_keymap[] = {
        0
 };
 
-static struct omap_kp_platform_data sdp3430_kp_data = {
+static struct twl4030_keypad_data sdp3430_kp_data = {
        .rows           = 5,
        .cols           = 6,
        .keymap         = sdp3430_keymap,
@@ -119,14 +119,6 @@ static struct omap_kp_platform_data sdp3430_kp_data = {
        .irq            = TWL4030_MODIRQ_KEYPAD,
 };
 
-static struct platform_device sdp3430_kp_device = {
-       .name           = "omap_twl4030keypad",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = &sdp3430_kp_data,
-       },
-};
-
 static int ts_gpio;
 
 static int __init msecure_init(void)
@@ -252,7 +244,6 @@ static struct platform_device sdp3430_lcd_device = {
 
 static struct platform_device *sdp3430_devices[] __initdata = {
        &sdp3430_smc91x_device,
-       &sdp3430_kp_device,
        &sdp3430_lcd_device,
 };
 
@@ -312,6 +303,9 @@ static struct omap_board_config_kernel sdp3430_config[] __initdata = {
 static struct twl4030_platform_data sdp3430_twldata = {
        .irq_base       = TWL4030_IRQ_BASE,
        .irq_end        = TWL4030_IRQ_END,
+
+       /* platform_data for children goes here */
+       .keypad         = &sdp3430_kp_data,
 };
 
 static struct i2c_board_info __initdata sdp3430_i2c_boardinfo[] = {