fix broken patch file from #2997
[openwrt/staging/chunkeey.git] / target / linux / ixp4xx / patches-2.6.23 / 025-dsmg600_i2c_gpio_driver_support.patch
1 Index: linux-2.6.22-rc3-git2-armeb/arch/arm/mach-ixp4xx/dsmg600-setup.c
2 ===================================================================
3 --- linux-2.6.22-rc3-git2-armeb.orig/arch/arm/mach-ixp4xx/dsmg600-setup.c 2007-05-31 04:05:30.000000000 -0700
4 +++ linux-2.6.22-rc3-git2-armeb/arch/arm/mach-ixp4xx/dsmg600-setup.c 2007-05-31 04:13:02.000000000 -0700
5 @@ -14,6 +14,7 @@
6 #include <linux/kernel.h>
7 #include <linux/serial.h>
8 #include <linux/serial_8250.h>
9 +#include <linux/i2c-gpio.h>
10
11 #include <asm/mach-types.h>
12 #include <asm/mach/arch.h>
13 @@ -37,15 +38,17 @@
14 .resource = &dsmg600_flash_resource,
15 };
16
17 -static struct ixp4xx_i2c_pins dsmg600_i2c_gpio_pins = {
18 +static struct i2c_gpio_platform_data dsmg600_i2c_gpio_data = {
19 .sda_pin = DSMG600_SDA_PIN,
20 .scl_pin = DSMG600_SCL_PIN,
21 };
22
23 -static struct platform_device dsmg600_i2c_controller = {
24 - .name = "IXP4XX-I2C",
25 +static struct platform_device dsmg600_i2c_gpio = {
26 + .name = "i2c-gpio",
27 .id = 0,
28 - .dev.platform_data = &dsmg600_i2c_gpio_pins,
29 + .dev = {
30 + .platform_data = &dsmg600_i2c_gpio_data,
31 + },
32 };
33
34 #ifdef CONFIG_LEDS_CLASS
35 @@ -116,7 +119,7 @@
36 };
37
38 static struct platform_device *dsmg600_devices[] __initdata = {
39 - &dsmg600_i2c_controller,
40 + &dsmg600_i2c_gpio,
41 &dsmg600_flash,
42 };
43