All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 09/17] t7166xb: mfd_cell is now implicitly available to drivers
@ 2011-02-12  2:11 ` Andres Salomon
  0 siblings, 0 replies; 8+ messages in thread
From: Andres Salomon @ 2011-02-12  2:11 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: linux-kernel, Mark Brown, David Woodhouse, linux-mtd


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] 8+ messages in thread

* [PATCH 09/17] t7166xb: mfd_cell is now implicitly available to drivers
@ 2011-02-12  2:11 ` Andres Salomon
  0 siblings, 0 replies; 8+ messages in thread
From: Andres Salomon @ 2011-02-12  2:11 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] 8+ messages in thread

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

On Fri, 2011-02-11 at 18:11 -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.

Wold it be possible to separate out MTD-related changes?

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


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

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

On Fri, 2011-02-11 at 18:11 -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.

Wold it be possible to separate out MTD-related changes?

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

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

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

On Mon, 14 Feb 2011 11:17:44 +0200
Artem Bityutskiy <dedekind1@gmail.com> wrote:

> On Fri, 2011-02-11 at 18:11 -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.
> 
> Wold it be possible to separate out MTD-related changes?
> 

It's possible, sure.  Patch 09 is the only one that touches
drivers/mtd.  It would introduce build and/or runtime problems if mtd
and mfd trees get out of synch, however.

I was hoping to get subsystem maintainer ACKs and run everything
through the mfd tree, if possible (though I haven't heard any feedback
from Samuel about any of this yet).

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

* Re: [PATCH 09/17] t7166xb: mfd_cell is now implicitly available to drivers
@ 2011-02-14 10:00     ` Andres Salomon
  0 siblings, 0 replies; 8+ messages in thread
From: Andres Salomon @ 2011-02-14 10:00 UTC (permalink / raw)
  To: dedekind1
  Cc: linux-mtd, Mark Brown, David Woodhouse, Samuel Ortiz, linux-kernel

On Mon, 14 Feb 2011 11:17:44 +0200
Artem Bityutskiy <dedekind1@gmail.com> wrote:

> On Fri, 2011-02-11 at 18:11 -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.
> 
> Wold it be possible to separate out MTD-related changes?
> 

It's possible, sure.  Patch 09 is the only one that touches
drivers/mtd.  It would introduce build and/or runtime problems if mtd
and mfd trees get out of synch, however.

I was hoping to get subsystem maintainer ACKs and run everything
through the mfd tree, if possible (though I haven't heard any feedback
from Samuel about any of this yet).

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

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

On Mon, 2011-02-14 at 02:00 -0800, Andres Salomon wrote:
> On Mon, 14 Feb 2011 11:17:44 +0200
> Artem Bityutskiy <dedekind1@gmail.com> wrote:
> 
> > On Fri, 2011-02-11 at 18:11 -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.
> > 
> > Wold it be possible to separate out MTD-related changes?
> > 
> 
> It's possible, sure.  Patch 09 is the only one that touches
> drivers/mtd.  It would introduce build and/or runtime problems if mtd
> and mfd trees get out of synch, however.
> 
> I was hoping to get subsystem maintainer ACKs and run everything
> through the mfd tree, if possible (though I haven't heard any feedback
> from Samuel about any of this yet).

OK, I'm not MTD maintainer, but I'd say that you can merge it via mfd
tree. I did no look at the whole set, but mtd changes look trivial and
there should not be issues with merging that via the mfd tree.

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


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

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

On Mon, 2011-02-14 at 02:00 -0800, Andres Salomon wrote:
> On Mon, 14 Feb 2011 11:17:44 +0200
> Artem Bityutskiy <dedekind1@gmail.com> wrote:
> 
> > On Fri, 2011-02-11 at 18:11 -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.
> > 
> > Wold it be possible to separate out MTD-related changes?
> > 
> 
> It's possible, sure.  Patch 09 is the only one that touches
> drivers/mtd.  It would introduce build and/or runtime problems if mtd
> and mfd trees get out of synch, however.
> 
> I was hoping to get subsystem maintainer ACKs and run everything
> through the mfd tree, if possible (though I haven't heard any feedback
> from Samuel about any of this yet).

OK, I'm not MTD maintainer, but I'd say that you can merge it via mfd
tree. I did no look at the whole set, but mtd changes look trivial and
there should not be issues with merging that via the mfd tree.

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

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

end of thread, other threads:[~2011-02-14 11:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-12  2:11 [PATCH 09/17] t7166xb: mfd_cell is now implicitly available to drivers Andres Salomon
2011-02-12  2:11 ` Andres Salomon
2011-02-14  9:17 ` Artem Bityutskiy
2011-02-14  9:17   ` Artem Bityutskiy
2011-02-14 10:00   ` Andres Salomon
2011-02-14 10:00     ` Andres Salomon
2011-02-14 11:04     ` Artem Bityutskiy
2011-02-14 11:04       ` Artem Bityutskiy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.