[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150813105037.129ef75f@canb.auug.org.au>
Date: Thu, 13 Aug 2015 10:50:37 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Chanwoo Choi <cw00.choi@...sung.com>
Cc: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>,
Linus Walleij <linus.walleij@...aro.org>,
linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
Roger Quadros <rogerq@...com>
Subject: Re: linux-next: build failure after merge of the gpio tree
Hi Chanwoo,
On Thu, 13 Aug 2015 09:19:12 +0900 Chanwoo Choi <cw00.choi@...sung.com> wrote:
>
> Hi Stephen,
>
> On 08/13/2015 08:02 AM, Stephen Rothwell wrote:
> > Hi Uwe,
> >
> > On Wed, 12 Aug 2015 22:16:42 +0200 Uwe Kleine-König <u.kleine-koenig@...gutronix.de> wrote:
> >>
> >> On Wed, Aug 12, 2015 at 06:10:45PM +1000, Stephen Rothwell wrote:
> >>> After merging the gpio tree, today's linux-next build (powerpc
> >>> allyesconfig) failed like this:
> >>>
> >>> drivers/extcon/extcon-palmas.c:211:25: error: too few arguments to function 'devm_gpiod_get_optional'
> >>> palmas_usb->id_gpiod = devm_gpiod_get_optional(&pdev->dev, "id");
> >>> ^
> >>> In file included from /home/sfr/next/next/include/asm-generic/gpio.h:13:0,
> >>> from /home/sfr/next/next/include/linux/gpio.h:51,
> >>> from /home/sfr/next/next/include/linux/of_gpio.h:20,
> >>> from /home/sfr/next/next/include/linux/mfd/palmas.h:24,
> >>> from /home/sfr/next/next/drivers/extcon/extcon-palmas.c:28:
> >>> /home/sfr/next/next/include/linux/gpio/consumer.h:80:32: note: declared here
> >>> struct gpio_desc *__must_check devm_gpiod_get_optional(struct device *dev,
> >>> ^
> >>>
> >>> Caused by commit
> >>>
> >>> b17d1bf16cc7 ("gpio: make flags mandatory for gpiod_get functions")
> >>>
> >>> interacting with commit
> >>>
> >>> 92b7cb5dc885 ("extcon: palmas: Support GPIO based USB ID detection")
> >> that commit is not correct. After
> >>
> >> palmas_usb->id_gpiod = devm_gpiod_get_optional(&pdev->dev, "id");
> >>
> >> it does
> >>
> >> palmas_usb->gpio_id_irq = gpiod_to_irq(palmas_usb->id_gpiod);
> >>
> >> without setting the gpio to input. So the right fix is not to add
> >> GPIOD_ASIS but GPIOD_IN.
> >
> > OK, I have fixed my merge fix patch, but can you submit a correct patch
> > to the extcon tree maintainer, please? I assume it can be fixed in
> > that tree right now, right?
> >
>
> I'll fix it as Uwe comment as following:
>
> --- a/drivers/extcon/extcon-palmas.c
> +++ b/drivers/extcon/extcon-palmas.c
> @@ -208,7 +208,8 @@ static int palmas_usb_probe(struct platform_device *pdev)
> palmas_usb->wakeup = pdata->wakeup;
> }
>
> - palmas_usb->id_gpiod = devm_gpiod_get_optional(&pdev->dev, "id");
> + palmas_usb->id_gpiod =
> + devm_gpiod_get_optional(&pdev->dev, "id", GPIOD_IN);
> if (IS_ERR(palmas_usb->id_gpiod)) {
> dev_err(&pdev->dev, "failed to get id gpio\n");
> return PTR_ERR(palmas_usb->id_gpiod);
>
> I'll send it to LKML and apply it on extcon-next tree.
Thanks.
--
Cheers,
Stephen Rothwell sfr@...b.auug.org.au
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists