linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Jernej Škrabec" <jernej.skrabec@gmail.com>
To: "Emilio López" <emilio@elopez.com.ar>,
	"Michael Turquette" <mturquette@baylibre.com>,
	"Stephen Boyd" <sboyd@kernel.org>, "Chen-Yu Tsai" <wens@csie.org>,
	"Samuel Holland" <samuel@sholland.org>,
	"Yangtao Li" <frank.li@vivo.com>
Cc: Yangtao Li <frank.li@vivo.com>,
	linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 01/13] clk: sunxi: sun9i-mmc: Use devm_platform_get_and_ioremap_resource()
Date: Tue, 11 Jul 2023 20:27:13 +0200	[thread overview]
Message-ID: <9132614.CDJkKcVGEf@jernej-laptop> (raw)
In-Reply-To: <20230705065313.67043-1-frank.li@vivo.com>

Dne sreda, 05. julij 2023 ob 08:53:01 CEST je Yangtao Li napisal(a):
> Convert platform_get_resource(), devm_ioremap_resource() to a single
> call to devm_platform_get_and_ioremap_resource(), as this is exactly
> what this function does.
> 
> Signed-off-by: Yangtao Li <frank.li@vivo.com>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej

> ---
>  drivers/clk/sunxi/clk-sun9i-mmc.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/clk/sunxi/clk-sun9i-mmc.c
> b/drivers/clk/sunxi/clk-sun9i-mmc.c index 636bcf2439ef..0862b02b1ed4 100644
> --- a/drivers/clk/sunxi/clk-sun9i-mmc.c
> +++ b/drivers/clk/sunxi/clk-sun9i-mmc.c
> @@ -108,15 +108,13 @@ static int sun9i_a80_mmc_config_clk_probe(struct
> platform_device *pdev)
> 
>  	spin_lock_init(&data->lock);
> 
> -	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!r)
> -		return -EINVAL;
> -	/* one clock/reset pair per word */
> -	count = DIV_ROUND_UP((resource_size(r)), SUN9I_MMC_WIDTH);
> -	data->membase = devm_ioremap_resource(&pdev->dev, r);
> +	data->membase = devm_platform_get_and_ioremap_resource(pdev, 0, 
&r);
>  	if (IS_ERR(data->membase))
>  		return PTR_ERR(data->membase);
> 
> +	/* one clock/reset pair per word */
> +	count = DIV_ROUND_UP((resource_size(r)), SUN9I_MMC_WIDTH);
> +
>  	clk_data = &data->clk_data;
>  	clk_data->clk_num = count;
>  	clk_data->clks = devm_kcalloc(&pdev->dev, count, sizeof(struct clk 
*),





_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2023-07-11 18:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-05  6:53 [PATCH 01/13] clk: sunxi: sun9i-mmc: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-05  6:53 ` [PATCH 02/13] clk: actions: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-08-22 21:54   ` Stephen Boyd
2023-07-05  6:53 ` [PATCH 04/13] clk: bm1880: " Yangtao Li
2023-08-22 21:54   ` Stephen Boyd
2023-07-05  6:53 ` [PATCH 08/13] clk: imx: clk-imx8qxp-lpcg: " Yangtao Li
2023-07-05  6:53 ` [PATCH 09/13] clk: mediatek: " Yangtao Li
2023-08-22 21:53   ` Stephen Boyd
2023-07-05  6:53 ` [PATCH 12/13] clk: nuvoton: " Yangtao Li
2023-07-05  7:57   ` Jacky Huang
2023-08-22 21:51   ` Stephen Boyd
2023-07-05  6:53 ` [PATCH 13/13] clk: mvebu: " Yangtao Li
2023-08-22 21:51   ` Stephen Boyd
2023-07-11 18:27 ` Jernej Škrabec [this message]
2023-07-30 22:44 ` [PATCH 01/13] clk: sunxi: sun9i-mmc: Use devm_platform_get_and_ioremap_resource() Jernej Škrabec
2023-08-14 10:09 ` Abel Vesa

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=9132614.CDJkKcVGEf@jernej-laptop \
    --to=jernej.skrabec@gmail.com \
    --cc=emilio@elopez.com.ar \
    --cc=frank.li@vivo.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=mturquette@baylibre.com \
    --cc=samuel@sholland.org \
    --cc=sboyd@kernel.org \
    --cc=wens@csie.org \
    /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;
as well as URLs for NNTP newsgroup(s).