Merge branch 'fortglx/39/tip/timers/rtc' of git://git.linaro.org/people/jstultz/linux...
[pandora-kernel.git] / drivers / mtd / nand / tmio_nand.c
index 3041d1f..14c5787 100644 (file)
@@ -4,7 +4,7 @@
  * Slightly murky pre-git history of the driver:
  *
  * Copyright (c) Ian Molton 2004, 2005, 2008
- *    Original work, independant of sharps code. Included hardware ECC support.
+ *    Original work, independent of sharps code. Included hardware ECC support.
  *    Hard ECC did not work for writes in the early revisions.
  * Copyright (c) Dirk Opfer 2005.
  *    Modifications developed from sharps code but
@@ -319,7 +319,7 @@ static int tmio_nand_correct_data(struct mtd_info *mtd, unsigned char *buf,
 
 static int tmio_hw_init(struct platform_device *dev, struct tmio_nand *tmio)
 {
-       struct mfd_cell *cell = dev_get_platdata(&dev->dev);
+       const struct mfd_cell *cell = mfd_get_cell(dev);
        int ret;
 
        if (cell->enable) {
@@ -363,7 +363,7 @@ static int tmio_hw_init(struct platform_device *dev, struct tmio_nand *tmio)
 
 static void tmio_hw_stop(struct platform_device *dev, struct tmio_nand *tmio)
 {
-       struct mfd_cell *cell = dev_get_platdata(&dev->dev);
+       const struct mfd_cell *cell = mfd_get_cell(dev);
 
        tmio_iowrite8(FCR_MODE_POWER_OFF, tmio->fcr + FCR_MODE);
        if (cell->disable)
@@ -372,8 +372,7 @@ static void tmio_hw_stop(struct platform_device *dev, struct tmio_nand *tmio)
 
 static int tmio_probe(struct platform_device *dev)
 {
-       struct mfd_cell *cell = dev_get_platdata(&dev->dev);
-       struct tmio_nand_data *data = cell->driver_data;
+       struct tmio_nand_data *data = mfd_get_data(dev);
        struct resource *fcr = platform_get_resource(dev,
                        IORESOURCE_MEM, 0);
        struct resource *ccr = platform_get_resource(dev,
@@ -516,7 +515,7 @@ static int tmio_remove(struct platform_device *dev)
 #ifdef CONFIG_PM
 static int tmio_suspend(struct platform_device *dev, pm_message_t state)
 {
-       struct mfd_cell *cell = dev_get_platdata(&dev->dev);
+       const struct mfd_cell *cell = mfd_get_cell(dev);
 
        if (cell->suspend)
                cell->suspend(dev);
@@ -527,7 +526,7 @@ static int tmio_suspend(struct platform_device *dev, pm_message_t state)
 
 static int tmio_resume(struct platform_device *dev)
 {
-       struct mfd_cell *cell = dev_get_platdata(&dev->dev);
+       const struct mfd_cell *cell = mfd_get_cell(dev);
 
        /* FIXME - is this required or merely another attack of the broken
         * SHARP platform? Looks suspicious.