Patchwork [05/13] mtd: gpmi-nand : Let device core handle pinctrl

login
register
mail settings
Submitter Fabio Estevam
Date May 6, 2013, 6:05 p.m.
Message ID <1367863561-11534-5-git-send-email-fabio.estevam@freescale.com>
Download mbox | patch
Permalink /patch/241747/
State Accepted
Commit 9f7f7d8c062331cf4218e0ef2fa573913bad337f
Headers show

Comments

Fabio Estevam - May 6, 2013, 6:05 p.m.
Since commit ab78029 (drivers/pinctrl: grab default handles from device core),
we can rely on device core for handling pinctrl.

So remove devm_pinctrl_get_select_default() from the driver. 

Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: <linux-mtd@lists.infradead.org>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/mtd/nand/gpmi-nand/gpmi-nand.c |    9 ---------
 1 file changed, 9 deletions(-)
Fabio Estevam - May 26, 2013, 9 p.m.
Hi Artem,

On Mon, May 6, 2013 at 3:05 PM, Fabio Estevam
<fabio.estevam@freescale.com> wrote:
> Since commit ab78029 (drivers/pinctrl: grab default handles from device core),
> we can rely on device core for handling pinctrl.
>
> So remove devm_pinctrl_get_select_default() from the driver.
>
> Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
> Cc: <linux-mtd@lists.infradead.org>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Any comments on this one?
Artem Bityutskiy - July 1, 2013, 5:19 a.m.
On Mon, 2013-05-06 at 15:05 -0300, Fabio Estevam wrote:
> Since commit ab78029 (drivers/pinctrl: grab default handles from device core),
> we can rely on device core for handling pinctrl.
> 
> So remove devm_pinctrl_get_select_default() from the driver. 
> 
> Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
> Cc: <linux-mtd@lists.infradead.org>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Acked-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Fabio Estevam - July 1, 2013, 11:27 a.m.
On Mon, Jul 1, 2013 at 2:19 AM, Artem Bityutskiy
<artem.bityutskiy@linux.intel.com> wrote:
> On Mon, 2013-05-06 at 15:05 -0300, Fabio Estevam wrote:
>> Since commit ab78029 (drivers/pinctrl: grab default handles from device core),
>> we can rely on device core for handling pinctrl.
>>
>> So remove devm_pinctrl_get_select_default() from the driver.
>>
>> Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
>> Cc: <linux-mtd@lists.infradead.org>
>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
>
> Acked-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>

Thanks, Artem.

Could you please apply this into your tree?
Artem Bityutskiy - July 1, 2013, 11:49 a.m.
On Mon, 2013-05-06 at 15:05 -0300, Fabio Estevam wrote:
> Since commit ab78029 (drivers/pinctrl: grab default handles from device core),
> we can rely on device core for handling pinctrl.
> 
> So remove devm_pinctrl_get_select_default() from the driver. 

Pushed to l2-mtd.git, thanks!

Patch

diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
index 717881a..e8adefa 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
@@ -26,7 +26,6 @@ 
 #include <linux/interrupt.h>
 #include <linux/module.h>
 #include <linux/mtd/partitions.h>
-#include <linux/pinctrl/consumer.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/of_mtd.h>
@@ -565,7 +564,6 @@  err_clock:
 
 static int acquire_resources(struct gpmi_nand_data *this)
 {
-	struct pinctrl *pinctrl;
 	int ret;
 
 	ret = acquire_register_block(this, GPMI_NAND_GPMI_REGS_ADDR_RES_NAME);
@@ -584,19 +582,12 @@  static int acquire_resources(struct gpmi_nand_data *this)
 	if (ret)
 		goto exit_dma_channels;
 
-	pinctrl = devm_pinctrl_get_select_default(&this->pdev->dev);
-	if (IS_ERR(pinctrl)) {
-		ret = PTR_ERR(pinctrl);
-		goto exit_pin;
-	}
-
 	ret = gpmi_get_clks(this);
 	if (ret)
 		goto exit_clock;
 	return 0;
 
 exit_clock:
-exit_pin:
 	release_dma_channels(this);
 exit_dma_channels:
 	release_bch_irq(this);