fix broken patch file from #2997
[librecmc/librecmc.git] / target / linux / ixp4xx / patches-2.6.23 / 026-ixdp425_i2c_gpio_driver_support.patch
1 diff -uprN linux-2.6.23.orig/arch/arm/mach-ixp4xx/ixdp425-setup.c linux-2.6.23/arch/arm/mach-ixp4xx/ixdp425-setup.c
2 --- linux-2.6.23.orig/arch/arm/mach-ixp4xx/ixdp425-setup.c      2007-10-09 15:31:38.000000000 -0500
3 +++ linux-2.6.23/arch/arm/mach-ixp4xx/ixdp425-setup.c   2007-10-11 01:01:02.000000000 -0500
4 @@ -15,6 +15,7 @@
5  #include <linux/tty.h>
6  #include <linux/serial_8250.h>
7  #include <linux/slab.h>
8 +#include <linux/i2c-gpio.h>
9  #include <linux/io.h>
10  #include <linux/mtd/mtd.h>
11  #include <linux/mtd/nand.h>
12 @@ -120,18 +121,17 @@ static struct platform_device ixdp425_fl
13  };
14  #endif /* CONFIG_MTD_NAND_PLATFORM */
15  
16 -static struct ixp4xx_i2c_pins ixdp425_i2c_gpio_pins = {
17 +static struct i2c_gpio_platform_data ixdp425_i2c_gpio_data = {
18         .sda_pin        = IXDP425_SDA_PIN,
19         .scl_pin        = IXDP425_SCL_PIN,
20  };
21  
22 -static struct platform_device ixdp425_i2c_controller = {
23 -       .name           = "IXP4XX-I2C",
24 +static struct platform_device ixdp425_i2c_gpio = {
25 +       .name           = "i2c-gpio",
26         .id             = 0,
27 -       .dev            = {
28 -               .platform_data = &ixdp425_i2c_gpio_pins,
29 +       .dev     = {
30 +               .platform_data  = &ixdp425_i2c_gpio_data,
31         },
32 -       .num_resources  = 0
33  };
34  
35  static struct resource ixdp425_uart_resources[] = {
36 @@ -178,7 +178,7 @@ static struct platform_device ixdp425_ua
37  };
38  
39  static struct platform_device *ixdp425_devices[] __initdata = {
40 -       &ixdp425_i2c_controller,
41 +       &ixdp425_i2c_gpio,
42         &ixdp425_flash,
43  #if defined(CONFIG_MTD_NAND_PLATFORM) || \
44      defined(CONFIG_MTD_NAND_PLATFORM_MODULE)