[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <80d7b0ad-026d-6ba9-7c1f-7f0c3b5af588@linux.alibaba.com>
Date: Tue, 12 Sep 2023 18:05:48 +0800
From: Baolin Wang <baolin.wang@...ux.alibaba.com>
To: Bartosz Golaszewski <brgl@...ev.pl>,
Linus Walleij <linus.walleij@...aro.org>,
Andy Shevchenko <andy@...nel.org>,
Orson Zhai <orsonzhai@...il.com>,
Chunyan Zhang <zhang.lyra@...il.com>
Cc: linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [RFT PATCH 3/3] gpio: eic-sprd: use
devm_platform_ioremap_resource()
On 9/12/2023 5:45 PM, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
>
> Make two calls into one by using devm_platform_ioremap_resource().
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Please don't do this. See the previous commit:
4ed7d7dd4890bb8120a3e77c16191a695fdfcc5a ("Revert "gpio: eic-sprd: Use
devm_platform_ioremap_resource()"")
> ---
> drivers/gpio/gpio-eic-sprd.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/gpio/gpio-eic-sprd.c b/drivers/gpio/gpio-eic-sprd.c
> index be7f2fa5aa7b..1e548e4e4cb8 100644
> --- a/drivers/gpio/gpio-eic-sprd.c
> +++ b/drivers/gpio/gpio-eic-sprd.c
> @@ -594,7 +594,6 @@ static int sprd_eic_probe(struct platform_device *pdev)
> struct device *dev = &pdev->dev;
> struct gpio_irq_chip *irq;
> struct sprd_eic *sprd_eic;
> - struct resource *res;
> int ret, i;
>
> pdata = of_device_get_match_data(dev);
> @@ -621,11 +620,7 @@ static int sprd_eic_probe(struct platform_device *pdev)
> * have one bank EIC, thus base[1] and base[2] can be
> * optional.
> */
> - res = platform_get_resource(pdev, IORESOURCE_MEM, i);
> - if (!res)
> - break;
> -
> - sprd_eic->base[i] = devm_ioremap_resource(dev, res);
> + sprd_eic->base[i] = devm_platform_ioremap_resource(pdev, i);
> if (IS_ERR(sprd_eic->base[i]))
> return PTR_ERR(sprd_eic->base[i]);
> }
Powered by blists - more mailing lists