aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/tmio_nand.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/nand/tmio_nand.c')
-rw-r--r--drivers/mtd/nand/tmio_nand.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/mtd/nand/tmio_nand.c b/drivers/mtd/nand/tmio_nand.c
index 3041d1f7ae3f..38fb16771f85 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
320static int tmio_hw_init(struct platform_device *dev, struct tmio_nand *tmio) 320static int tmio_hw_init(struct platform_device *dev, struct tmio_nand *tmio)
321{ 321{
322 struct mfd_cell *cell = dev_get_platdata(&dev->dev); 322 const struct mfd_cell *cell = mfd_get_cell(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
364static void tmio_hw_stop(struct platform_device *dev, struct tmio_nand *tmio) 364static void tmio_hw_stop(struct platform_device *dev, struct tmio_nand *tmio)
365{ 365{
366 struct mfd_cell *cell = dev_get_platdata(&dev->dev); 366 const struct mfd_cell *cell = mfd_get_cell(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,8 +372,7 @@ static void tmio_hw_stop(struct platform_device *dev, struct tmio_nand *tmio)
372 372
373static int tmio_probe(struct platform_device *dev) 373static int tmio_probe(struct platform_device *dev)
374{ 374{
375 struct mfd_cell *cell = dev_get_platdata(&dev->dev); 375 struct tmio_nand_data *data = mfd_get_data(dev);
376 struct tmio_nand_data *data = cell->driver_data;
377 struct resource *fcr = platform_get_resource(dev, 376 struct resource *fcr = platform_get_resource(dev,
378 IORESOURCE_MEM, 0); 377 IORESOURCE_MEM, 0);
379 struct resource *ccr = platform_get_resource(dev, 378 struct resource *ccr = platform_get_resource(dev,
@@ -516,7 +515,7 @@ static int tmio_remove(struct platform_device *dev)
516#ifdef CONFIG_PM 515#ifdef CONFIG_PM
517static int tmio_suspend(struct platform_device *dev, pm_message_t state) 516static int tmio_suspend(struct platform_device *dev, pm_message_t state)
518{ 517{
519 struct mfd_cell *cell = dev_get_platdata(&dev->dev); 518 const struct mfd_cell *cell = mfd_get_cell(dev);
520 519
521 if (cell->suspend) 520 if (cell->suspend)
522 cell->suspend(dev); 521 cell->suspend(dev);
@@ -527,7 +526,7 @@ static int tmio_suspend(struct platform_device *dev, pm_message_t state)
527 526
528static int tmio_resume(struct platform_device *dev) 527static int tmio_resume(struct platform_device *dev)
529{ 528{
530 struct mfd_cell *cell = dev_get_platdata(&dev->dev); 529 const struct mfd_cell *cell = mfd_get_cell(dev);
531 530
532 /* FIXME - is this required or merely another attack of the broken 531 /* FIXME - is this required or merely another attack of the broken
533 * SHARP platform? Looks suspicious. 532 * SHARP platform? Looks suspicious.