[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMz4ku+zfKUero=YiWsOFqt=qvf7GoO1Agk8OvDYpC=bHMnjjA@mail.gmail.com>
Date: Tue, 2 Apr 2019 17:20:25 +0800
From: Baolin Wang <baolin.wang@...aro.org>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: "Enrico Weigelt, metux IT consult" <info@...ux.net>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
Andrew Jeffery <andrew@...id.au>,
Florian Fainelli <f.fainelli@...il.com>,
Scott Branden <sbranden@...adcom.com>,
bcm-kernel-feedback-list <bcm-kernel-feedback-list@...adcom.com>,
Hoan Tran <hoan@...amperecomputing.com>,
Orson Zhai <orsonzhai@...il.com>,
Lyra Zhang <zhang.lyra@...il.com>,
Keguang Zhang <keguang.zhang@...il.com>,
Vladimir Zapolskiy <vz@...ia.com>,
Matthias Brugger <matthias.bgg@...il.com>,
"thierry.reding@...il.com" <thierry.reding@...il.com>,
Grygorii Strashko <grygorii.strashko@...com>,
Santosh Shilimkar <ssantosh@...nel.org>,
Kevin Hilman <khilman@...nel.org>,
Robert Jarzmik <robert.jarzmik@...e.fr>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Jun Nie <jun.nie@...aro.org>, Shawn Guo <shawnguo@...nel.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
linux-mips@...r.kernel.org, linux-pwm@...r.kernel.org,
Linux-OMAP <linux-omap@...r.kernel.org>,
linux-tegra@...r.kernel.org
Subject: Re: [PATCH 29/42] drivers: gpio: sprd: use devm_platform_ioremap_resource()
On Tue, 2 Apr 2019 at 17:19, Linus Walleij <linus.walleij@...aro.org> wrote:
>
> On Tue, Apr 2, 2019 at 4:10 PM Baolin Wang <baolin.wang@...aro.org> wrote:
> > On Tue, 2 Apr 2019 at 17:04, Linus Walleij <linus.walleij@...aro.org> wrote:
> > >
> > > On Tue, Mar 12, 2019 at 1:57 AM Enrico Weigelt, metux IT consult
> > > <info@...ux.net> wrote:
> > >
> > > > Use the new helper that wraps the calls to platform_get_resource()
> > > > and devm_ioremap_resource() together.
> > > >
> > > > Signed-off-by: Enrico Weigelt, metux IT consult <info@...ux.net>
> > >
> > > Patch applied with Baolin's ACK.
> >
> > This patch had some problems which I've pointed out and I did not ack
> > this patch. Please do not apply it now until fixing the problem.
>
> Sorry, it's the gmail threading that confuse the different patches.
>
> The patch I actually applied is for gpio-sprd.c and looks like this:
Yes, this one is correct. Thanks :)
>
> commit 851f66daeab961328507dcce0980cd7e4ff5f9ae (HEAD -> devel)
> Author: Enrico Weigelt, metux IT consult <info@...ux.net>
> Date: Mon Mar 11 19:55:08 2019 +0100
>
> drivers: gpio: sprd: use devm_platform_ioremap_resource()
>
> Use the new helper that wraps the calls to platform_get_resource()
> and devm_ioremap_resource() together.
>
> Signed-off-by: Enrico Weigelt, metux IT consult <info@...ux.net>
> Reviewed-by: Baolin Wang <baolin.wang@...aro.org>
> Signed-off-by: Linus Walleij <linus.walleij@...aro.org>
>
> diff --git a/drivers/gpio/gpio-sprd.c b/drivers/gpio/gpio-sprd.c
> index 55072d2b367f..f5c8b3a351d5 100644
> --- a/drivers/gpio/gpio-sprd.c
> +++ b/drivers/gpio/gpio-sprd.c
> @@ -219,7 +219,6 @@ static int sprd_gpio_probe(struct platform_device *pdev)
> {
> struct gpio_irq_chip *irq;
> struct sprd_gpio *sprd_gpio;
> - struct resource *res;
> int ret;
>
> sprd_gpio = devm_kzalloc(&pdev->dev, sizeof(*sprd_gpio), GFP_KERNEL);
> @@ -232,8 +231,7 @@ static int sprd_gpio_probe(struct platform_device *pdev)
> return sprd_gpio->irq;
> }
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - sprd_gpio->base = devm_ioremap_resource(&pdev->dev, res);
> + sprd_gpio->base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(sprd_gpio->base))
> return PTR_ERR(sprd_gpio->base);
>
> Yours,
> Linus Walleij
--
Baolin Wang
Best Regards
Powered by blists - more mailing lists