Commit a23090ad authored by Andres Salomon's avatar Andres Salomon Committed by Samuel Ortiz

mfd: mfd_cell is now implicitly available to t7166xb drivers

No need to explicitly set the cell's platform_data/data_size.

Modify clients to use mfd_get_cell helper function instead of
accessing platform_data directly.
Signed-off-by: default avatarAndres Salomon <dilinger@queued.net>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent e46dccff
...@@ -384,15 +384,6 @@ static int t7l66xb_probe(struct platform_device *dev) ...@@ -384,15 +384,6 @@ static int t7l66xb_probe(struct platform_device *dev)
t7l66xb_attach_irq(dev); t7l66xb_attach_irq(dev);
t7l66xb_cells[T7L66XB_CELL_NAND].driver_data = pdata->nand_data; t7l66xb_cells[T7L66XB_CELL_NAND].driver_data = pdata->nand_data;
t7l66xb_cells[T7L66XB_CELL_NAND].platform_data =
&t7l66xb_cells[T7L66XB_CELL_NAND];
t7l66xb_cells[T7L66XB_CELL_NAND].data_size =
sizeof(t7l66xb_cells[T7L66XB_CELL_NAND]);
t7l66xb_cells[T7L66XB_CELL_MMC].platform_data =
&t7l66xb_cells[T7L66XB_CELL_MMC];
t7l66xb_cells[T7L66XB_CELL_MMC].data_size =
sizeof(t7l66xb_cells[T7L66XB_CELL_MMC]);
ret = mfd_add_devices(&dev->dev, dev->id, ret = mfd_add_devices(&dev->dev, dev->id,
t7l66xb_cells, ARRAY_SIZE(t7l66xb_cells), t7l66xb_cells, ARRAY_SIZE(t7l66xb_cells),
......
...@@ -319,7 +319,7 @@ static int tmio_nand_correct_data(struct mtd_info *mtd, unsigned char *buf, ...@@ -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) static int tmio_hw_init(struct platform_device *dev, struct tmio_nand *tmio)
{ {
struct mfd_cell *cell = dev_get_platdata(&dev->dev); struct mfd_cell *cell = mfd_get_cell(dev);
int ret; int ret;
if (cell->enable) { if (cell->enable) {
...@@ -363,7 +363,7 @@ static int tmio_hw_init(struct platform_device *dev, struct tmio_nand *tmio) ...@@ -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) static void tmio_hw_stop(struct platform_device *dev, struct tmio_nand *tmio)
{ {
struct mfd_cell *cell = dev_get_platdata(&dev->dev); struct mfd_cell *cell = mfd_get_cell(dev);
tmio_iowrite8(FCR_MODE_POWER_OFF, tmio->fcr + FCR_MODE); tmio_iowrite8(FCR_MODE_POWER_OFF, tmio->fcr + FCR_MODE);
if (cell->disable) if (cell->disable)
...@@ -372,7 +372,7 @@ static void tmio_hw_stop(struct platform_device *dev, struct tmio_nand *tmio) ...@@ -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) static int tmio_probe(struct platform_device *dev)
{ {
struct mfd_cell *cell = dev_get_platdata(&dev->dev); struct mfd_cell *cell = mfd_get_cell(dev);
struct tmio_nand_data *data = cell->driver_data; struct tmio_nand_data *data = cell->driver_data;
struct resource *fcr = platform_get_resource(dev, struct resource *fcr = platform_get_resource(dev,
IORESOURCE_MEM, 0); IORESOURCE_MEM, 0);
...@@ -516,7 +516,7 @@ static int tmio_remove(struct platform_device *dev) ...@@ -516,7 +516,7 @@ static int tmio_remove(struct platform_device *dev)
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int tmio_suspend(struct platform_device *dev, pm_message_t state) static int tmio_suspend(struct platform_device *dev, pm_message_t state)
{ {
struct mfd_cell *cell = dev_get_platdata(&dev->dev); struct mfd_cell *cell = mfd_get_cell(dev);
if (cell->suspend) if (cell->suspend)
cell->suspend(dev); cell->suspend(dev);
...@@ -527,7 +527,7 @@ static int tmio_suspend(struct platform_device *dev, pm_message_t state) ...@@ -527,7 +527,7 @@ static int tmio_suspend(struct platform_device *dev, pm_message_t state)
static int tmio_resume(struct platform_device *dev) static int tmio_resume(struct platform_device *dev)
{ {
struct mfd_cell *cell = dev_get_platdata(&dev->dev); struct mfd_cell *cell = mfd_get_cell(dev);
/* FIXME - is this required or merely another attack of the broken /* FIXME - is this required or merely another attack of the broken
* SHARP platform? Looks suspicious. * SHARP platform? Looks suspicious.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment