public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 09/29] t7166xb: mfd_cell is now implicitly available to drivers
       [not found] <1297998456-7615-1-git-send-email-dilinger@queued.net>
@ 2011-02-18  3:07 ` Andres Salomon
  2011-02-25  9:05   ` Artem Bityutskiy
  2011-02-18  3:07 ` [PATCH 23/29] tmio-nand: use mfd_data instead of driver_data Andres Salomon
  1 sibling, 1 reply; 4+ messages in thread
From: Andres Salomon @ 2011-02-18  3:07 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: linux-mtd, Mark Brown, David Woodhouse, linux-kernel

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: Andres Salomon <dilinger@queued.net>
---
 drivers/mfd/t7l66xb.c        |    9 ---------
 drivers/mtd/nand/tmio_nand.c |   10 +++++-----
 2 files changed, 5 insertions(+), 14 deletions(-)

diff --git a/drivers/mfd/t7l66xb.c b/drivers/mfd/t7l66xb.c
index 9caeb4a..b9c1e4c 100644
--- a/drivers/mfd/t7l66xb.c
+++ b/drivers/mfd/t7l66xb.c
@@ -384,15 +384,6 @@ static int t7l66xb_probe(struct platform_device *dev)
 	t7l66xb_attach_irq(dev);
 
 	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,
 			      t7l66xb_cells, ARRAY_SIZE(t7l66xb_cells),
diff --git a/drivers/mtd/nand/tmio_nand.c b/drivers/mtd/nand/tmio_nand.c
index 3041d1f..5bf63e3 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,
 
 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;
 
 	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);
+	struct mfd_cell *cell = mfd_get_cell(dev);
 
 	tmio_iowrite8(FCR_MODE_POWER_OFF, tmio->fcr + FCR_MODE);
 	if (cell->disable)
@@ -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 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 resource *fcr = platform_get_resource(dev,
 			IORESOURCE_MEM, 0);
@@ -516,7 +516,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);
+	struct mfd_cell *cell = mfd_get_cell(dev);
 
 	if (cell->suspend)
 		cell->suspend(dev);
@@ -527,7 +527,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);
+	struct mfd_cell *cell = mfd_get_cell(dev);
 
 	/* FIXME - is this required or merely another attack of the broken
 	 * SHARP platform? Looks suspicious.
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 23/29] tmio-nand: use mfd_data instead of driver_data
       [not found] <1297998456-7615-1-git-send-email-dilinger@queued.net>
  2011-02-18  3:07 ` [PATCH 09/29] t7166xb: mfd_cell is now implicitly available to drivers Andres Salomon
@ 2011-02-18  3:07 ` Andres Salomon
  1 sibling, 0 replies; 4+ messages in thread
From: Andres Salomon @ 2011-02-18  3:07 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: linux-mtd, Mark Brown, David Woodhouse, linux-kernel

Use mfd_data for passing information from mfd drivers to mfd
clients.  The mfd_cell's driver_data field is being phased out.

Clients that were using driver_data now access .mfd_data
via mfd_get_data().  This changes tmio-nand only; mfd drivers with
other cells are not modified.

Signed-off-by: Andres Salomon <dilinger@queued.net>
---
 drivers/mfd/t7l66xb.c        |    2 +-
 drivers/mfd/tc6393xb.c       |    2 +-
 drivers/mtd/nand/tmio_nand.c |    3 +--
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/mfd/t7l66xb.c b/drivers/mfd/t7l66xb.c
index 3c9e389..af57fc7 100644
--- a/drivers/mfd/t7l66xb.c
+++ b/drivers/mfd/t7l66xb.c
@@ -383,7 +383,7 @@ static int t7l66xb_probe(struct platform_device *dev)
 
 	t7l66xb_attach_irq(dev);
 
-	t7l66xb_cells[T7L66XB_CELL_NAND].driver_data = pdata->nand_data;
+	t7l66xb_cells[T7L66XB_CELL_NAND].mfd_data = pdata->nand_data;
 
 	ret = mfd_add_devices(&dev->dev, dev->id,
 			      t7l66xb_cells, ARRAY_SIZE(t7l66xb_cells),
diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
index 7f7b9fa..ecb045b 100644
--- a/drivers/mfd/tc6393xb.c
+++ b/drivers/mfd/tc6393xb.c
@@ -693,7 +693,7 @@ static int __devinit tc6393xb_probe(struct platform_device *dev)
 			goto err_setup;
 	}
 
-	tc6393xb_cells[TC6393XB_CELL_NAND].driver_data = tcpd->nand_data;
+	tc6393xb_cells[TC6393XB_CELL_NAND].mfd_data = tcpd->nand_data;
 	tc6393xb_cells[TC6393XB_CELL_FB].driver_data = tcpd->fb_data;
 
 	ret = mfd_add_devices(&dev->dev, dev->id,
diff --git a/drivers/mtd/nand/tmio_nand.c b/drivers/mtd/nand/tmio_nand.c
index 5bf63e3..2383b8f 100644
--- a/drivers/mtd/nand/tmio_nand.c
+++ b/drivers/mtd/nand/tmio_nand.c
@@ -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 = mfd_get_cell(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,
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 09/29] t7166xb: mfd_cell is now implicitly available to drivers
  2011-02-18  3:07 ` [PATCH 09/29] t7166xb: mfd_cell is now implicitly available to drivers Andres Salomon
@ 2011-02-25  9:05   ` Artem Bityutskiy
  2011-02-25 10:47     ` Samuel Ortiz
  0 siblings, 1 reply; 4+ messages in thread
From: Artem Bityutskiy @ 2011-02-25  9:05 UTC (permalink / raw)
  To: Andres Salomon
  Cc: David Woodhouse, Mark Brown, linux-mtd, Samuel Ortiz,
	linux-kernel

On Thu, 2011-02-17 at 19:07 -0800, Andres Salomon wrote:
> 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: Andres Salomon <dilinger@queued.net>

Just to re-confirm, I suggest to merge these MTD changes via Samuel's
tree, thanks.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 09/29] t7166xb: mfd_cell is now implicitly available to drivers
  2011-02-25  9:05   ` Artem Bityutskiy
@ 2011-02-25 10:47     ` Samuel Ortiz
  0 siblings, 0 replies; 4+ messages in thread
From: Samuel Ortiz @ 2011-02-25 10:47 UTC (permalink / raw)
  To: Artem Bityutskiy
  Cc: David Woodhouse, Mark Brown, linux-mtd, linux-kernel,
	Andres Salomon

Hi Artem,

On Fri, Feb 25, 2011 at 11:05:12AM +0200, Artem Bityutskiy wrote:
> On Thu, 2011-02-17 at 19:07 -0800, Andres Salomon wrote:
> > 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: Andres Salomon <dilinger@queued.net>
> 
> Just to re-confirm, I suggest to merge these MTD changes via Samuel's
> tree, thanks.
Thanks, I'll take them.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-02-25 10:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1297998456-7615-1-git-send-email-dilinger@queued.net>
2011-02-18  3:07 ` [PATCH 09/29] t7166xb: mfd_cell is now implicitly available to drivers Andres Salomon
2011-02-25  9:05   ` Artem Bityutskiy
2011-02-25 10:47     ` Samuel Ortiz
2011-02-18  3:07 ` [PATCH 23/29] tmio-nand: use mfd_data instead of driver_data Andres Salomon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox