diff options
author | Anatolij Gustschin <agust@denx.de> | 2010-06-02 20:37:17 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-06-03 06:28:45 -0400 |
commit | b51adeae29d1ca07090d4f9c9c886499351e0129 (patch) | |
tree | 899d7c397f60475651c22b1884620e7da2367d68 /drivers/mtd | |
parent | e72e6497e74811e01d72b4c1b7537b3aea3ee857 (diff) |
of/mtd: nand: fix build breakage in drivers
Fixes build errors in drivers caused by the OF device_node
pointer being moved into struct device
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/fsl_upm.c | 17 | ||||
-rw-r--r-- | drivers/mtd/nand/socrates_nand.c | 4 |
2 files changed, 11 insertions, 10 deletions
diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/fsl_upm.c index 2d215ccb564d..3efceb61e74b 100644 --- a/drivers/mtd/nand/fsl_upm.c +++ b/drivers/mtd/nand/fsl_upm.c | |||
@@ -232,7 +232,7 @@ static int __devinit fun_probe(struct of_device *ofdev, | |||
232 | if (!fun) | 232 | if (!fun) |
233 | return -ENOMEM; | 233 | return -ENOMEM; |
234 | 234 | ||
235 | ret = of_address_to_resource(ofdev->node, 0, &io_res); | 235 | ret = of_address_to_resource(ofdev->dev.of_node, 0, &io_res); |
236 | if (ret) { | 236 | if (ret) { |
237 | dev_err(&ofdev->dev, "can't get IO base\n"); | 237 | dev_err(&ofdev->dev, "can't get IO base\n"); |
238 | goto err1; | 238 | goto err1; |
@@ -244,7 +244,8 @@ static int __devinit fun_probe(struct of_device *ofdev, | |||
244 | goto err1; | 244 | goto err1; |
245 | } | 245 | } |
246 | 246 | ||
247 | prop = of_get_property(ofdev->node, "fsl,upm-addr-offset", &size); | 247 | prop = of_get_property(ofdev->dev.of_node, "fsl,upm-addr-offset", |
248 | &size); | ||
248 | if (!prop || size != sizeof(uint32_t)) { | 249 | if (!prop || size != sizeof(uint32_t)) { |
249 | dev_err(&ofdev->dev, "can't get UPM address offset\n"); | 250 | dev_err(&ofdev->dev, "can't get UPM address offset\n"); |
250 | ret = -EINVAL; | 251 | ret = -EINVAL; |
@@ -252,7 +253,7 @@ static int __devinit fun_probe(struct of_device *ofdev, | |||
252 | } | 253 | } |
253 | fun->upm_addr_offset = *prop; | 254 | fun->upm_addr_offset = *prop; |
254 | 255 | ||
255 | prop = of_get_property(ofdev->node, "fsl,upm-cmd-offset", &size); | 256 | prop = of_get_property(ofdev->dev.of_node, "fsl,upm-cmd-offset", &size); |
256 | if (!prop || size != sizeof(uint32_t)) { | 257 | if (!prop || size != sizeof(uint32_t)) { |
257 | dev_err(&ofdev->dev, "can't get UPM command offset\n"); | 258 | dev_err(&ofdev->dev, "can't get UPM command offset\n"); |
258 | ret = -EINVAL; | 259 | ret = -EINVAL; |
@@ -260,7 +261,7 @@ static int __devinit fun_probe(struct of_device *ofdev, | |||
260 | } | 261 | } |
261 | fun->upm_cmd_offset = *prop; | 262 | fun->upm_cmd_offset = *prop; |
262 | 263 | ||
263 | prop = of_get_property(ofdev->node, | 264 | prop = of_get_property(ofdev->dev.of_node, |
264 | "fsl,upm-addr-line-cs-offsets", &size); | 265 | "fsl,upm-addr-line-cs-offsets", &size); |
265 | if (prop && (size / sizeof(uint32_t)) > 0) { | 266 | if (prop && (size / sizeof(uint32_t)) > 0) { |
266 | fun->mchip_count = size / sizeof(uint32_t); | 267 | fun->mchip_count = size / sizeof(uint32_t); |
@@ -276,7 +277,7 @@ static int __devinit fun_probe(struct of_device *ofdev, | |||
276 | 277 | ||
277 | for (i = 0; i < fun->mchip_count; i++) { | 278 | for (i = 0; i < fun->mchip_count; i++) { |
278 | fun->rnb_gpio[i] = -1; | 279 | fun->rnb_gpio[i] = -1; |
279 | rnb_gpio = of_get_gpio(ofdev->node, i); | 280 | rnb_gpio = of_get_gpio(ofdev->dev.of_node, i); |
280 | if (rnb_gpio >= 0) { | 281 | if (rnb_gpio >= 0) { |
281 | ret = gpio_request(rnb_gpio, dev_name(&ofdev->dev)); | 282 | ret = gpio_request(rnb_gpio, dev_name(&ofdev->dev)); |
282 | if (ret) { | 283 | if (ret) { |
@@ -292,13 +293,13 @@ static int __devinit fun_probe(struct of_device *ofdev, | |||
292 | } | 293 | } |
293 | } | 294 | } |
294 | 295 | ||
295 | prop = of_get_property(ofdev->node, "chip-delay", NULL); | 296 | prop = of_get_property(ofdev->dev.of_node, "chip-delay", NULL); |
296 | if (prop) | 297 | if (prop) |
297 | fun->chip_delay = *prop; | 298 | fun->chip_delay = *prop; |
298 | else | 299 | else |
299 | fun->chip_delay = 50; | 300 | fun->chip_delay = 50; |
300 | 301 | ||
301 | prop = of_get_property(ofdev->node, "fsl,upm-wait-flags", &size); | 302 | prop = of_get_property(ofdev->dev.of_node, "fsl,upm-wait-flags", &size); |
302 | if (prop && size == sizeof(uint32_t)) | 303 | if (prop && size == sizeof(uint32_t)) |
303 | fun->wait_flags = *prop; | 304 | fun->wait_flags = *prop; |
304 | else | 305 | else |
@@ -315,7 +316,7 @@ static int __devinit fun_probe(struct of_device *ofdev, | |||
315 | fun->dev = &ofdev->dev; | 316 | fun->dev = &ofdev->dev; |
316 | fun->last_ctrl = NAND_CLE; | 317 | fun->last_ctrl = NAND_CLE; |
317 | 318 | ||
318 | ret = fun_chip_init(fun, ofdev->node, &io_res); | 319 | ret = fun_chip_init(fun, ofdev->dev.of_node, &io_res); |
319 | if (ret) | 320 | if (ret) |
320 | goto err2; | 321 | goto err2; |
321 | 322 | ||
diff --git a/drivers/mtd/nand/socrates_nand.c b/drivers/mtd/nand/socrates_nand.c index b37cbde6e7db..f02f8e23d905 100644 --- a/drivers/mtd/nand/socrates_nand.c +++ b/drivers/mtd/nand/socrates_nand.c | |||
@@ -183,7 +183,7 @@ static int __devinit socrates_nand_probe(struct of_device *ofdev, | |||
183 | return -ENOMEM; | 183 | return -ENOMEM; |
184 | } | 184 | } |
185 | 185 | ||
186 | host->io_base = of_iomap(ofdev->node, 0); | 186 | host->io_base = of_iomap(ofdev->dev.of_node, 0); |
187 | if (host->io_base == NULL) { | 187 | if (host->io_base == NULL) { |
188 | printk(KERN_ERR "socrates_nand: ioremap failed\n"); | 188 | printk(KERN_ERR "socrates_nand: ioremap failed\n"); |
189 | kfree(host); | 189 | kfree(host); |
@@ -244,7 +244,7 @@ static int __devinit socrates_nand_probe(struct of_device *ofdev, | |||
244 | #ifdef CONFIG_MTD_OF_PARTS | 244 | #ifdef CONFIG_MTD_OF_PARTS |
245 | if (num_partitions == 0) { | 245 | if (num_partitions == 0) { |
246 | num_partitions = of_mtd_parse_partitions(&ofdev->dev, | 246 | num_partitions = of_mtd_parse_partitions(&ofdev->dev, |
247 | ofdev->node, | 247 | ofdev->dev.of_node, |
248 | &partitions); | 248 | &partitions); |
249 | if (num_partitions < 0) { | 249 | if (num_partitions < 0) { |
250 | res = num_partitions; | 250 | res = num_partitions; |