[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <85221044-5d7c-5b33-7704-5558b7992fa6@baylibre.com>
Date: Wed, 8 Sep 2021 09:47:57 +0200
From: Neil Armstrong <narmstrong@...libre.com>
To: Cai Huoqing <caihuoqing@...du.com>
Cc: Kevin Hilman <khilman@...libre.com>,
Jerome Brunet <jbrunet@...libre.com>,
Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
linux-arm-kernel@...ts.infradead.org,
linux-amlogic@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] soc: amlogic: meson-clk-measure: Make use of the
helper function devm_platform_ioremap_resource()
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@...du.com>
> ---
> drivers/soc/amlogic/meson-clk-measure.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/soc/amlogic/meson-clk-measure.c b/drivers/soc/amlogic/meson-clk-measure.c
> index 6dd190270123..3f3039600357 100644
> --- a/drivers/soc/amlogic/meson-clk-measure.c
> +++ b/drivers/soc/amlogic/meson-clk-measure.c
> @@ -606,7 +606,6 @@ static int meson_msr_probe(struct platform_device *pdev)
> {
> const struct meson_msr_id *match_data;
> struct meson_msr *priv;
> - struct resource *res;
> struct dentry *root, *clks;
> void __iomem *base;
> int i;
> @@ -624,8 +623,7 @@ static int meson_msr_probe(struct platform_device *pdev)
>
> memcpy(priv->msr_table, match_data, sizeof(priv->msr_table));
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - base = devm_ioremap_resource(&pdev->dev, res);
> + base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(base))
> return PTR_ERR(base);
>
>
Reviewed-by: Neil Armstrong <narmstrong@...libre.com>
Powered by blists - more mailing lists