[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdUSpSBriV8i=zSbSqeDTxnf_QuXO+u1Cx+jXshBaSbiZg@mail.gmail.com>
Date: Wed, 8 Mar 2023 09:37:49 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Yang Li <yang.lee@...ux.alibaba.com>
Cc: niklas.soderlund@...natech.se, rafael@...nel.org,
daniel.lezcano@...aro.org, amitk@...nel.org, rui.zhang@...el.com,
linux-renesas-soc@...r.kernel.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] thermal/hwmon: Use devm_platform_ioremap_resource()
Hi Yang,
On Wed, Mar 8, 2023 at 7:17 AM Yang Li <yang.lee@...ux.alibaba.com> wrote:
> According to commit 7945f929f1a7 ("drivers: provide
> devm_platform_ioremap_resource()"), convert platform_get_resource(),
> devm_ioremap_resource() to a single call to Use
> devm_platform_ioremap_resource(), as this is exactly what this function
> does.
Thanks for your patch!
> Signed-off-by: Yang Li <yang.lee@...ux.alibaba.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>
> --- a/drivers/thermal/rcar_thermal.c
> +++ b/drivers/thermal/rcar_thermal.c
> @@ -435,9 +435,7 @@ static int rcar_thermal_probe(struct platform_device *pdev)
> * Then, driver uses common registers
> * rcar_has_irq_support() will be enabled
> */
> - res = platform_get_resource(pdev, IORESOURCE_MEM,
> - mres++);
> - common->base = devm_ioremap_resource(dev, res);
> + common->base = devm_platform_ioremap_resource(pdev, mres++);
> if (IS_ERR(common->base)) {
> ret = PTR_ERR(common->base);
> goto error_unregister;
Note that there is a second opportunity for conversion in the same
function, a few lines below.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists