[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2b343ef8-45ac-e7a0-91cc-879980593b27@baylibre.com>
Date: Thu, 17 Oct 2019 14:50:11 +0200
From: Neil Armstrong <narmstrong@...libre.com>
To: YueHaibing <yuehaibing@...wei.com>, linus.walleij@...aro.org,
manivannan.sadhasivam@...aro.org, afaerber@...e.de,
f.fainelli@...il.com, rjui@...adcom.com, sbranden@...adcom.com,
bcm-kernel-feedback-list@...adcom.com, jesper.nilsson@...s.com,
lars.persson@...s.com, ludovic.desroches@...rochip.com,
nicolas.ferre@...rochip.com, alexandre.belloni@...tlin.com,
baruch@...s.co.il
Cc: linux-arm-kernel@...ts.infradead.org, linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...s.com,
linux-oxnas@...ups.io, linux-renesas-soc@...r.kernel.org,
linux-arm-msm@...r.kernel.org, linux-tegra@...r.kernel.org,
vz@...ia.com, geert+renesas@...der.be, daniel@...que.org,
haojian.zhuang@...il.com, wens@...e.org, thierry.reding@...il.com,
jonathanh@...dia.com, agross@...nel.org
Subject: Re: [PATCH -next 15/30] pinctrl: oxnas: use
devm_platform_ioremap_resource() to simplify code
On 17/10/2019 14:26, YueHaibing wrote:
> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.
>
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>
> ---
> drivers/pinctrl/pinctrl-oxnas.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/pinctrl/pinctrl-oxnas.c b/drivers/pinctrl/pinctrl-oxnas.c
> index 40dc125..674b7b5 100644
> --- a/drivers/pinctrl/pinctrl-oxnas.c
> +++ b/drivers/pinctrl/pinctrl-oxnas.c
> @@ -1196,7 +1196,6 @@ static int oxnas_gpio_probe(struct platform_device *pdev)
> struct oxnas_gpio_bank *bank;
> unsigned int id, ngpios;
> int irq, ret;
> - struct resource *res;
> struct gpio_irq_chip *girq;
>
> if (of_parse_phandle_with_fixed_args(np, "gpio-ranges",
> @@ -1220,8 +1219,7 @@ static int oxnas_gpio_probe(struct platform_device *pdev)
>
> bank = &oxnas_gpio_banks[id];
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - bank->reg_base = devm_ioremap_resource(&pdev->dev, res);
> + bank->reg_base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(bank->reg_base))
> return PTR_ERR(bank->reg_base);
>
>
Acked-by: Neil Armstrong <narmstrong@...libre.com>
Powered by blists - more mailing lists