From: Neil Armstrong <narmstrong@baylibre.com>
To: Cai Huoqing <caihuoqing@baidu.com>
Cc: Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] soc: amlogic: canvas: Make use of the helper function devm_platform_ioremap_resource()
Date: Wed, 8 Sep 2021 09:47:50 +0200 [thread overview]
Message-ID: <dc885d03-7bf5-9441-f2fc-c8b22e725817@baylibre.com> (raw)
In-Reply-To: <20210908071544.603-1-caihuoqing@baidu.com>
On 08/09/2021 09:15, Cai Huoqing wrote:
> Use the devm_platform_ioremap_resource() helper instead of
> calling platform_get_resource() and devm_ioremap_resource()
> separately
>
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
> ---
> drivers/soc/amlogic/meson-canvas.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/soc/amlogic/meson-canvas.c b/drivers/soc/amlogic/meson-canvas.c
> index d0329ad170d1..383b0cfc584e 100644
> --- a/drivers/soc/amlogic/meson-canvas.c
> +++ b/drivers/soc/amlogic/meson-canvas.c
> @@ -168,7 +168,6 @@ EXPORT_SYMBOL_GPL(meson_canvas_free);
>
> static int meson_canvas_probe(struct platform_device *pdev)
> {
> - struct resource *res;
> struct meson_canvas *canvas;
> struct device *dev = &pdev->dev;
>
> @@ -176,8 +175,7 @@ static int meson_canvas_probe(struct platform_device *pdev)
> if (!canvas)
> return -ENOMEM;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - canvas->reg_base = devm_ioremap_resource(dev, res);
> + canvas->reg_base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(canvas->reg_base))
> return PTR_ERR(canvas->reg_base);
>
>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-09-08 8:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-08 7:15 [PATCH 1/2] soc: amlogic: canvas: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
2021-09-08 7:15 ` [PATCH 2/2] soc: amlogic: meson-clk-measure: " Cai Huoqing
2021-09-08 7:47 ` Neil Armstrong
2021-09-08 7:47 ` Neil Armstrong [this message]
2021-09-13 7:44 ` [PATCH 1/2] soc: amlogic: canvas: " Neil Armstrong
-- strict thread matches above, loose matches on Subject: below --
2021-09-08 7:11 Cai Huoqing
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dc885d03-7bf5-9441-f2fc-c8b22e725817@baylibre.com \
--to=narmstrong@baylibre.com \
--cc=caihuoqing@baidu.com \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox