Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mtd: Use platform_data to retrieve tmio_nand platform bits

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>

+6 -3
+2 -1
drivers/mfd/t7l66xb.c
··· 383 383 384 384 t7l66xb_attach_irq(dev); 385 385 386 - t7l66xb_cells[T7L66XB_CELL_NAND].mfd_data = pdata->nand_data; 386 + t7l66xb_cells[T7L66XB_CELL_NAND].platform_data = pdata->nand_data; 387 + t7l66xb_cells[T7L66XB_CELL_NAND].pdata_size = sizeof(*pdata->nand_data); 387 388 388 389 ret = mfd_add_devices(&dev->dev, dev->id, 389 390 t7l66xb_cells, ARRAY_SIZE(t7l66xb_cells),
+3 -1
drivers/mfd/tc6393xb.c
··· 693 693 goto err_setup; 694 694 } 695 695 696 - tc6393xb_cells[TC6393XB_CELL_NAND].mfd_data = tcpd->nand_data; 696 + tc6393xb_cells[TC6393XB_CELL_NAND].platform_data = tcpd->nand_data; 697 + tc6393xb_cells[TC6393XB_CELL_NAND].pdata_size = 698 + sizeof(*tcpd->nand_data); 697 699 tc6393xb_cells[TC6393XB_CELL_FB].platform_data = tcpd->fb_data; 698 700 tc6393xb_cells[TC6393XB_CELL_FB].pdata_size = sizeof(*tcpd->fb_data); 699 701
+1 -1
drivers/mtd/nand/tmio_nand.c
··· 372 372 373 373 static int tmio_probe(struct platform_device *dev) 374 374 { 375 - struct tmio_nand_data *data = mfd_get_data(dev); 375 + struct tmio_nand_data *data = dev->dev.platform_data; 376 376 struct resource *fcr = platform_get_resource(dev, 377 377 IORESOURCE_MEM, 0); 378 378 struct resource *ccr = platform_get_resource(dev,