diff options
Diffstat (limited to 'drivers/mtd/nand/tmio_nand.c')
-rw-r--r-- | drivers/mtd/nand/tmio_nand.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/mtd/nand/tmio_nand.c b/drivers/mtd/nand/tmio_nand.c index fa28f01ae009..3041d1f7ae3f 100644 --- a/drivers/mtd/nand/tmio_nand.c +++ b/drivers/mtd/nand/tmio_nand.c | |||
@@ -319,7 +319,7 @@ static int tmio_nand_correct_data(struct mtd_info *mtd, unsigned char *buf, | |||
319 | 319 | ||
320 | static int tmio_hw_init(struct platform_device *dev, struct tmio_nand *tmio) | 320 | static int tmio_hw_init(struct platform_device *dev, struct tmio_nand *tmio) |
321 | { | 321 | { |
322 | struct mfd_cell *cell = (struct mfd_cell *)dev->dev.platform_data; | 322 | struct mfd_cell *cell = dev_get_platdata(&dev->dev); |
323 | int ret; | 323 | int ret; |
324 | 324 | ||
325 | if (cell->enable) { | 325 | if (cell->enable) { |
@@ -363,7 +363,7 @@ static int tmio_hw_init(struct platform_device *dev, struct tmio_nand *tmio) | |||
363 | 363 | ||
364 | static void tmio_hw_stop(struct platform_device *dev, struct tmio_nand *tmio) | 364 | static void tmio_hw_stop(struct platform_device *dev, struct tmio_nand *tmio) |
365 | { | 365 | { |
366 | struct mfd_cell *cell = (struct mfd_cell *)dev->dev.platform_data; | 366 | struct mfd_cell *cell = dev_get_platdata(&dev->dev); |
367 | 367 | ||
368 | tmio_iowrite8(FCR_MODE_POWER_OFF, tmio->fcr + FCR_MODE); | 368 | tmio_iowrite8(FCR_MODE_POWER_OFF, tmio->fcr + FCR_MODE); |
369 | if (cell->disable) | 369 | if (cell->disable) |
@@ -372,7 +372,7 @@ static void tmio_hw_stop(struct platform_device *dev, struct tmio_nand *tmio) | |||
372 | 372 | ||
373 | static int tmio_probe(struct platform_device *dev) | 373 | static int tmio_probe(struct platform_device *dev) |
374 | { | 374 | { |
375 | struct mfd_cell *cell = (struct mfd_cell *)dev->dev.platform_data; | 375 | struct mfd_cell *cell = dev_get_platdata(&dev->dev); |
376 | struct tmio_nand_data *data = cell->driver_data; | 376 | struct tmio_nand_data *data = cell->driver_data; |
377 | struct resource *fcr = platform_get_resource(dev, | 377 | struct resource *fcr = platform_get_resource(dev, |
378 | IORESOURCE_MEM, 0); | 378 | IORESOURCE_MEM, 0); |
@@ -405,14 +405,14 @@ static int tmio_probe(struct platform_device *dev) | |||
405 | mtd->priv = nand_chip; | 405 | mtd->priv = nand_chip; |
406 | mtd->name = "tmio-nand"; | 406 | mtd->name = "tmio-nand"; |
407 | 407 | ||
408 | tmio->ccr = ioremap(ccr->start, ccr->end - ccr->start + 1); | 408 | tmio->ccr = ioremap(ccr->start, resource_size(ccr)); |
409 | if (!tmio->ccr) { | 409 | if (!tmio->ccr) { |
410 | retval = -EIO; | 410 | retval = -EIO; |
411 | goto err_iomap_ccr; | 411 | goto err_iomap_ccr; |
412 | } | 412 | } |
413 | 413 | ||
414 | tmio->fcr_base = fcr->start & 0xfffff; | 414 | tmio->fcr_base = fcr->start & 0xfffff; |
415 | tmio->fcr = ioremap(fcr->start, fcr->end - fcr->start + 1); | 415 | tmio->fcr = ioremap(fcr->start, resource_size(fcr)); |
416 | if (!tmio->fcr) { | 416 | if (!tmio->fcr) { |
417 | retval = -EIO; | 417 | retval = -EIO; |
418 | goto err_iomap_fcr; | 418 | goto err_iomap_fcr; |
@@ -516,7 +516,7 @@ static int tmio_remove(struct platform_device *dev) | |||
516 | #ifdef CONFIG_PM | 516 | #ifdef CONFIG_PM |
517 | static int tmio_suspend(struct platform_device *dev, pm_message_t state) | 517 | static int tmio_suspend(struct platform_device *dev, pm_message_t state) |
518 | { | 518 | { |
519 | struct mfd_cell *cell = (struct mfd_cell *)dev->dev.platform_data; | 519 | struct mfd_cell *cell = dev_get_platdata(&dev->dev); |
520 | 520 | ||
521 | if (cell->suspend) | 521 | if (cell->suspend) |
522 | cell->suspend(dev); | 522 | cell->suspend(dev); |
@@ -527,7 +527,7 @@ static int tmio_suspend(struct platform_device *dev, pm_message_t state) | |||
527 | 527 | ||
528 | static int tmio_resume(struct platform_device *dev) | 528 | static int tmio_resume(struct platform_device *dev) |
529 | { | 529 | { |
530 | struct mfd_cell *cell = (struct mfd_cell *)dev->dev.platform_data; | 530 | struct mfd_cell *cell = dev_get_platdata(&dev->dev); |
531 | 531 | ||
532 | /* FIXME - is this required or merely another attack of the broken | 532 | /* FIXME - is this required or merely another attack of the broken |
533 | * SHARP platform? Looks suspicious. | 533 | * SHARP platform? Looks suspicious. |