diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-11-17 10:47:30 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-11-17 10:47:30 -0500 |
commit | 7d78c887a94067ba218dc71b89d0d7a09415197f (patch) | |
tree | ff87df902888694cada5173e91edeee6119a8d7e | |
parent | 0db169f9703115bab09eda5d89a8f6937a7bf98e (diff) |
[DRIVER MODEL] Fix merge clashes with ARM ixp2000 / ixp4xx platforms
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | drivers/i2c/busses/i2c-ixp2000.c | 6 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-ixp4xx.c | 6 | ||||
-rw-r--r-- | drivers/mtd/maps/ixp2000.c | 22 |
3 files changed, 15 insertions, 19 deletions
diff --git a/drivers/i2c/busses/i2c-ixp2000.c b/drivers/i2c/busses/i2c-ixp2000.c index cef024a7d048..cd6f45d186ab 100644 --- a/drivers/i2c/busses/i2c-ixp2000.c +++ b/drivers/i2c/busses/i2c-ixp2000.c | |||
@@ -36,8 +36,6 @@ | |||
36 | #include <asm/hardware.h> /* Pick up IXP2000-specific bits */ | 36 | #include <asm/hardware.h> /* Pick up IXP2000-specific bits */ |
37 | #include <asm/arch/gpio.h> | 37 | #include <asm/arch/gpio.h> |
38 | 38 | ||
39 | static struct device_driver ixp2000_i2c_driver; | ||
40 | |||
41 | static inline int ixp2000_scl_pin(void *data) | 39 | static inline int ixp2000_scl_pin(void *data) |
42 | { | 40 | { |
43 | return ((struct ixp2000_i2c_pins*)data)->scl_pin; | 41 | return ((struct ixp2000_i2c_pins*)data)->scl_pin; |
@@ -120,7 +118,7 @@ static int ixp2000_i2c_probe(struct platform_device *plat_dev) | |||
120 | drv_data->algo_data.timeout = 100; | 118 | drv_data->algo_data.timeout = 100; |
121 | 119 | ||
122 | drv_data->adapter.id = I2C_HW_B_IXP2000, | 120 | drv_data->adapter.id = I2C_HW_B_IXP2000, |
123 | strlcpy(drv_data->adapter.name, ixp2000_i2c_driver.name, | 121 | strlcpy(drv_data->adapter.name, plat_dev->dev.driver->name, |
124 | I2C_NAME_SIZE); | 122 | I2C_NAME_SIZE); |
125 | drv_data->adapter.algo_data = &drv_data->algo_data, | 123 | drv_data->adapter.algo_data = &drv_data->algo_data, |
126 | 124 | ||
@@ -132,7 +130,7 @@ static int ixp2000_i2c_probe(struct platform_device *plat_dev) | |||
132 | gpio_line_set(gpio->sda_pin, 0); | 130 | gpio_line_set(gpio->sda_pin, 0); |
133 | 131 | ||
134 | if ((err = i2c_bit_add_bus(&drv_data->adapter)) != 0) { | 132 | if ((err = i2c_bit_add_bus(&drv_data->adapter)) != 0) { |
135 | dev_err(dev, "Could not install, error %d\n", err); | 133 | dev_err(&plat_dev->dev, "Could not install, error %d\n", err); |
136 | kfree(drv_data); | 134 | kfree(drv_data); |
137 | return err; | 135 | return err; |
138 | } | 136 | } |
diff --git a/drivers/i2c/busses/i2c-ixp4xx.c b/drivers/i2c/busses/i2c-ixp4xx.c index aa36855fa995..e422d8b2d4d6 100644 --- a/drivers/i2c/busses/i2c-ixp4xx.c +++ b/drivers/i2c/busses/i2c-ixp4xx.c | |||
@@ -35,8 +35,6 @@ | |||
35 | 35 | ||
36 | #include <asm/hardware.h> /* Pick up IXP4xx-specific bits */ | 36 | #include <asm/hardware.h> /* Pick up IXP4xx-specific bits */ |
37 | 37 | ||
38 | static struct device_driver ixp4xx_i2c_driver; | ||
39 | |||
40 | static inline int ixp4xx_scl_pin(void *data) | 38 | static inline int ixp4xx_scl_pin(void *data) |
41 | { | 39 | { |
42 | return ((struct ixp4xx_i2c_pins*)data)->scl_pin; | 40 | return ((struct ixp4xx_i2c_pins*)data)->scl_pin; |
@@ -128,7 +126,7 @@ static int ixp4xx_i2c_probe(struct platform_device *plat_dev) | |||
128 | drv_data->algo_data.timeout = 100; | 126 | drv_data->algo_data.timeout = 100; |
129 | 127 | ||
130 | drv_data->adapter.id = I2C_HW_B_IXP4XX; | 128 | drv_data->adapter.id = I2C_HW_B_IXP4XX; |
131 | strlcpy(drv_data->adapter.name, ixp4xx_i2c_driver.name, | 129 | strlcpy(drv_data->adapter.name, plat_dev->dev.driver->name, |
132 | I2C_NAME_SIZE); | 130 | I2C_NAME_SIZE); |
133 | drv_data->adapter.algo_data = &drv_data->algo_data; | 131 | drv_data->adapter.algo_data = &drv_data->algo_data; |
134 | 132 | ||
@@ -140,7 +138,7 @@ static int ixp4xx_i2c_probe(struct platform_device *plat_dev) | |||
140 | gpio_line_set(gpio->sda_pin, 0); | 138 | gpio_line_set(gpio->sda_pin, 0); |
141 | 139 | ||
142 | if ((err = i2c_bit_add_bus(&drv_data->adapter) != 0)) { | 140 | if ((err = i2c_bit_add_bus(&drv_data->adapter) != 0)) { |
143 | printk(KERN_ERR "ERROR: Could not install %s\n", dev->bus_id); | 141 | printk(KERN_ERR "ERROR: Could not install %s\n", plat_dev->dev.bus_id); |
144 | 142 | ||
145 | kfree(drv_data); | 143 | kfree(drv_data); |
146 | return err; | 144 | return err; |
diff --git a/drivers/mtd/maps/ixp2000.c b/drivers/mtd/maps/ixp2000.c index fc7a78e31735..2c9cc7f37e92 100644 --- a/drivers/mtd/maps/ixp2000.c +++ b/drivers/mtd/maps/ixp2000.c | |||
@@ -159,12 +159,12 @@ static int ixp2000_flash_probe(struct platform_device *dev) | |||
159 | return -ENODEV; | 159 | return -ENODEV; |
160 | 160 | ||
161 | window_size = dev->resource->end - dev->resource->start + 1; | 161 | window_size = dev->resource->end - dev->resource->start + 1; |
162 | dev_info(_dev, "Probe of IXP2000 flash(%d banks x %dMiB)\n", | 162 | dev_info(&dev->dev, "Probe of IXP2000 flash(%d banks x %dMiB)\n", |
163 | ixp_data->nr_banks, ((u32)window_size >> 20)); | 163 | ixp_data->nr_banks, ((u32)window_size >> 20)); |
164 | 164 | ||
165 | if (plat->width != 1) { | 165 | if (plat->width != 1) { |
166 | dev_err(_dev, "IXP2000 MTD map only supports 8-bit mode, asking for %d\n", | 166 | dev_err(&dev->dev, "IXP2000 MTD map only supports 8-bit mode, asking for %d\n", |
167 | plat->width * 8); | 167 | plat->width * 8); |
168 | return -EIO; | 168 | return -EIO; |
169 | } | 169 | } |
170 | 170 | ||
@@ -202,7 +202,7 @@ static int ixp2000_flash_probe(struct platform_device *dev) | |||
202 | dev->resource->end - dev->resource->start + 1, | 202 | dev->resource->end - dev->resource->start + 1, |
203 | dev->dev.bus_id); | 203 | dev->dev.bus_id); |
204 | if (!info->res) { | 204 | if (!info->res) { |
205 | dev_err(_dev, "Could not reserve memory region\n"); | 205 | dev_err(&dev->dev, "Could not reserve memory region\n"); |
206 | err = -ENOMEM; | 206 | err = -ENOMEM; |
207 | goto Error; | 207 | goto Error; |
208 | } | 208 | } |
@@ -210,7 +210,7 @@ static int ixp2000_flash_probe(struct platform_device *dev) | |||
210 | info->map.map_priv_1 = (unsigned long) ioremap(dev->resource->start, | 210 | info->map.map_priv_1 = (unsigned long) ioremap(dev->resource->start, |
211 | dev->resource->end - dev->resource->start + 1); | 211 | dev->resource->end - dev->resource->start + 1); |
212 | if (!info->map.map_priv_1) { | 212 | if (!info->map.map_priv_1) { |
213 | dev_err(_dev, "Failed to ioremap flash region\n"); | 213 | dev_err(&dev->dev, "Failed to ioremap flash region\n"); |
214 | err = -EIO; | 214 | err = -EIO; |
215 | goto Error; | 215 | goto Error; |
216 | } | 216 | } |
@@ -221,13 +221,13 @@ static int ixp2000_flash_probe(struct platform_device *dev) | |||
221 | */ | 221 | */ |
222 | 222 | ||
223 | erratum44_workaround = ixp2000_has_broken_slowport(); | 223 | erratum44_workaround = ixp2000_has_broken_slowport(); |
224 | dev_info(_dev, "Erratum 44 workaround %s\n", | 224 | dev_info(&dev->dev, "Erratum 44 workaround %s\n", |
225 | erratum44_workaround ? "enabled" : "disabled"); | 225 | erratum44_workaround ? "enabled" : "disabled"); |
226 | #endif | 226 | #endif |
227 | 227 | ||
228 | info->mtd = do_map_probe(plat->map_name, &info->map); | 228 | info->mtd = do_map_probe(plat->map_name, &info->map); |
229 | if (!info->mtd) { | 229 | if (!info->mtd) { |
230 | dev_err(_dev, "map_probe failed\n"); | 230 | dev_err(&dev->dev, "map_probe failed\n"); |
231 | err = -ENXIO; | 231 | err = -ENXIO; |
232 | goto Error; | 232 | goto Error; |
233 | } | 233 | } |
@@ -237,7 +237,7 @@ static int ixp2000_flash_probe(struct platform_device *dev) | |||
237 | if (err > 0) { | 237 | if (err > 0) { |
238 | err = add_mtd_partitions(info->mtd, info->partitions, err); | 238 | err = add_mtd_partitions(info->mtd, info->partitions, err); |
239 | if(err) | 239 | if(err) |
240 | dev_err(_dev, "Could not parse partitions\n"); | 240 | dev_err(&dev->dev, "Could not parse partitions\n"); |
241 | } | 241 | } |
242 | 242 | ||
243 | if (err) | 243 | if (err) |
@@ -251,8 +251,8 @@ Error: | |||
251 | } | 251 | } |
252 | 252 | ||
253 | static struct platform_driver ixp2000_flash_driver = { | 253 | static struct platform_driver ixp2000_flash_driver = { |
254 | .probe = &ixp2000_flash_probe, | 254 | .probe = ixp2000_flash_probe, |
255 | .remove = &ixp2000_flash_remove | 255 | .remove = ixp2000_flash_remove, |
256 | .driver = { | 256 | .driver = { |
257 | .name = "IXP2000-Flash", | 257 | .name = "IXP2000-Flash", |
258 | }, | 258 | }, |