Patchwork mtd: nand: gpmi: fix compile error caused by pinctrl call

login
register
mail settings
Submitter Shawn Guo
Date May 19, 2012, 1:06 p.m.
Message ID <1337432773-24000-1-git-send-email-shawn.guo@linaro.org>
Download mbox | patch
Permalink /patch/160189/
State New
Headers show

Comments

Shawn Guo - May 19, 2012, 1:06 p.m.
Fix following compile error caused by commit 39febc0 (mtd: nand: gpmi:
adopt pinctrl support).

  CC      drivers/mtd/nand/gpmi-nand/gpmi-nand.o
drivers/mtd/nand/gpmi-nand/gpmi-nand.c: In function ‘acquire_resources’:
drivers/mtd/nand/gpmi-nand/gpmi-nand.c:499:45: error: ‘pdev’ undeclared (first use in this function)

Reported-by: Subodh Nijsure <snijsure@grid-net.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
Hi Arnd, Olof,

Can you please apply the patch on top of arm-soc/imx/pinctrl branch or
amend commit 39febc0 (mtd: nand: gpmi: adopt pinctrl support) with the
fixing?  Sorry for this mistake.

Regards,
Shawn

 drivers/mtd/nand/gpmi-nand/gpmi-nand.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Olof Johansson - May 19, 2012, 3:11 p.m.
On Sat, May 19, 2012 at 6:06 AM, Shawn Guo <shawn.guo@linaro.org> wrote:
> Fix following compile error caused by commit 39febc0 (mtd: nand: gpmi:
> adopt pinctrl support).
>
>  CC      drivers/mtd/nand/gpmi-nand/gpmi-nand.o
> drivers/mtd/nand/gpmi-nand/gpmi-nand.c: In function ‘acquire_resources’:
> drivers/mtd/nand/gpmi-nand/gpmi-nand.c:499:45: error: ‘pdev’ undeclared (first use in this function)
>
> Reported-by: Subodh Nijsure <snijsure@grid-net.com>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
> Hi Arnd, Olof,
>
> Can you please apply the patch on top of arm-soc/imx/pinctrl branch or
> amend commit 39febc0 (mtd: nand: gpmi: adopt pinctrl support) with the
> fixing?  Sorry for this mistake.

Applied to imx/pinctrl (and next/pinctrl).

Given that the mxs defconfig doesn't expose this error, would you mind
adding the driver to the platforms where it makes sense so we get
build coverage in linux next and for those who use defconfigs to
provide it?


Thanks!

-Olof
Shawn Guo - May 20, 2012, 1:38 a.m.
On Sat, May 19, 2012 at 08:11:30AM -0700, Olof Johansson wrote:
> Applied to imx/pinctrl (and next/pinctrl).
> 
Thanks.

> Given that the mxs defconfig doesn't expose this error, would you mind
> adding the driver to the platforms where it makes sense so we get
> build coverage in linux next and for those who use defconfigs to
> provide it?
> 
Yes.  I'm poking my colleague to testing device tree support for the
driver.  If everything works fine, we will enable the driver in
mxs_defconfig, but that will probably be next cycle.

Patch

diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
index 8478fd9..b68e043 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
@@ -496,7 +496,7 @@  static int __devinit acquire_resources(struct gpmi_nand_data *this)
 	if (ret)
 		goto exit_dma_channels;
 
-	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+	pinctrl = devm_pinctrl_get_select_default(&this->pdev->dev);
 	if (IS_ERR(pinctrl)) {
 		ret = PTR_ERR(pinctrl);
 		goto exit_pin;