ARM: ux500: Strip out duplicate touch screen platform information
authorLee Jones <lee.jones@linaro.org>
Thu, 27 Sep 2012 10:47:43 +0000 (11:47 +0100)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 28 Nov 2012 06:45:01 +0000 (22:45 -0800)
We're currently carrying two 'struct bu21013_platform_device's which
are identical for no apparent reason. Here we remove the extra burden
and apply the same information to the two different instances of the
bu21012_tp driver registration.

[Dmitry Torokhov: picked it up to (hopefully) reduce merge conflict with
 bu21013_ts update that follows.]

Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
arch/arm/mach-ux500/board-mop500-stuib.c

index 8c979770d8728b83ac75330e597135a3d78a57b7..564f57d5d8a74464ef3898b0086e2d8d8305d0f8 100644 (file)
@@ -162,18 +162,6 @@ static struct bu21013_platform_device tsc_plat_device = {
        .y_flip = true,
 };
 
-static struct bu21013_platform_device tsc_plat2_device = {
-       .cs_en = bu21013_gpio_board_init,
-       .cs_dis = bu21013_gpio_board_exit,
-       .irq_read_val = bu21013_read_pin_val,
-       .irq = NOMADIK_GPIO_TO_IRQ(TOUCH_GPIO_PIN),
-       .touch_x_max = TOUCH_XMAX,
-       .touch_y_max = TOUCH_YMAX,
-       .ext_clk = false,
-       .x_flip = false,
-       .y_flip = true,
-};
-
 static struct i2c_board_info __initdata u8500_i2c3_devices_stuib[] = {
        {
                I2C_BOARD_INFO("bu21013_tp", 0x5C),
@@ -181,21 +169,17 @@ static struct i2c_board_info __initdata u8500_i2c3_devices_stuib[] = {
        },
        {
                I2C_BOARD_INFO("bu21013_tp", 0x5D),
-               .platform_data = &tsc_plat2_device,
+               .platform_data = &tsc_plat_device,
        },
 
 };
 
 void __init mop500_stuib_init(void)
 {
-       if (machine_is_hrefv60()) {
+       if (machine_is_hrefv60())
                tsc_plat_device.cs_pin = HREFV60_TOUCH_RST_GPIO;
-               tsc_plat2_device.cs_pin = HREFV60_TOUCH_RST_GPIO;
-       } else {
+       else
                tsc_plat_device.cs_pin = GPIO_BU21013_CS;
-               tsc_plat2_device.cs_pin = GPIO_BU21013_CS;
-
-       }
 
        mop500_uib_i2c_add(0, mop500_i2c0_devices_stuib,
                        ARRAY_SIZE(mop500_i2c0_devices_stuib));