mtd: Use platform_data to retrieve tmio_nand platform bits
authorSamuel Ortiz <sameo@linux.intel.com>
Wed, 6 Apr 2011 10:20:49 +0000 (12:20 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 26 May 2011 17:45:04 +0000 (19:45 +0200)
With the addition of the platform device mfd_cell pointer, we can now
cleanly pass the sub device drivers platform data pointers through the
regular device platform_data one, and get rid of mfd_get_data().

Cc: Ian Molton <spyro@f2s.com>
Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Acked-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/t7l66xb.c
drivers/mfd/tc6393xb.c
drivers/mtd/nand/tmio_nand.c

index 5ef0b8fba1077b03c3313634cbb639cc0f059303..91ad21ef7721cddd335e5470717f3f878191bf0d 100644 (file)
@@ -383,7 +383,8 @@ static int t7l66xb_probe(struct platform_device *dev)
 
        t7l66xb_attach_irq(dev);
 
-       t7l66xb_cells[T7L66XB_CELL_NAND].mfd_data = pdata->nand_data;
+       t7l66xb_cells[T7L66XB_CELL_NAND].platform_data = pdata->nand_data;
+       t7l66xb_cells[T7L66XB_CELL_NAND].pdata_size = sizeof(*pdata->nand_data);
 
        ret = mfd_add_devices(&dev->dev, dev->id,
                              t7l66xb_cells, ARRAY_SIZE(t7l66xb_cells),
index b3d5852b0698848680d098096f0f0ed1978b6ec3..9612264f0e6dcf7832ebf2f4736815b4eabc6a4b 100644 (file)
@@ -693,7 +693,9 @@ static int __devinit tc6393xb_probe(struct platform_device *dev)
                        goto err_setup;
        }
 
-       tc6393xb_cells[TC6393XB_CELL_NAND].mfd_data = tcpd->nand_data;
+       tc6393xb_cells[TC6393XB_CELL_NAND].platform_data = tcpd->nand_data;
+       tc6393xb_cells[TC6393XB_CELL_NAND].pdata_size =
+                                               sizeof(*tcpd->nand_data);
        tc6393xb_cells[TC6393XB_CELL_FB].platform_data = tcpd->fb_data;
        tc6393xb_cells[TC6393XB_CELL_FB].pdata_size = sizeof(*tcpd->fb_data);
 
index 14c578707824b5e598ce5216da991ac52183e64f..c004e474631b4c3deca7ae4ffff18333e5384c04 100644 (file)
@@ -372,7 +372,7 @@ static void tmio_hw_stop(struct platform_device *dev, struct tmio_nand *tmio)
 
 static int tmio_probe(struct platform_device *dev)
 {
-       struct tmio_nand_data *data = mfd_get_data(dev);
+       struct tmio_nand_data *data = dev->dev.platform_data;
        struct resource *fcr = platform_get_resource(dev,
                        IORESOURCE_MEM, 0);
        struct resource *ccr = platform_get_resource(dev,