openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] mmc: sdhci-of-aspeed: Use devm_platform_get_and_ioremap_resource()
@ 2023-03-15  5:50 Yang Li
  2023-03-15 10:23 ` Adrian Hunter
  2023-03-23 12:12 ` Ulf Hansson
  0 siblings, 2 replies; 3+ messages in thread
From: Yang Li @ 2023-03-15  5:50 UTC (permalink / raw)
  To: ulf.hansson
  Cc: oel, linux-aspeed, andrew, openbmc, linux-mmc, adrian.hunter,
	linux-kernel, Yang Li, linux-arm-kernel

According to commit 890cc39a8799 ("drivers: provide
devm_platform_get_and_ioremap_resource()"), 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: Yang Li <yang.lee@linux.alibaba.com>
---
 drivers/mmc/host/sdhci-of-aspeed.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/mmc/host/sdhci-of-aspeed.c b/drivers/mmc/host/sdhci-of-aspeed.c
index ba6677bf7372..25b4073f698b 100644
--- a/drivers/mmc/host/sdhci-of-aspeed.c
+++ b/drivers/mmc/host/sdhci-of-aspeed.c
@@ -547,8 +547,7 @@ static int aspeed_sdc_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	sdc->res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	sdc->regs = devm_ioremap_resource(&pdev->dev, sdc->res);
+	sdc->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &sdc->res);
 	if (IS_ERR(sdc->regs)) {
 		ret = PTR_ERR(sdc->regs);
 		goto err_clk;
-- 
2.20.1.7.g153144c


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] mmc: sdhci-of-aspeed: Use devm_platform_get_and_ioremap_resource()
  2023-03-15  5:50 [PATCH -next] mmc: sdhci-of-aspeed: Use devm_platform_get_and_ioremap_resource() Yang Li
@ 2023-03-15 10:23 ` Adrian Hunter
  2023-03-23 12:12 ` Ulf Hansson
  1 sibling, 0 replies; 3+ messages in thread
From: Adrian Hunter @ 2023-03-15 10:23 UTC (permalink / raw)
  To: Yang Li, ulf.hansson
  Cc: oel, linux-aspeed, andrew, openbmc, linux-mmc, linux-kernel,
	linux-arm-kernel

On 15/03/23 07:50, Yang Li wrote:
> According to commit 890cc39a8799 ("drivers: provide
> devm_platform_get_and_ioremap_resource()"), 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: Yang Li <yang.lee@linux.alibaba.com>

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

> ---
>  drivers/mmc/host/sdhci-of-aspeed.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-of-aspeed.c b/drivers/mmc/host/sdhci-of-aspeed.c
> index ba6677bf7372..25b4073f698b 100644
> --- a/drivers/mmc/host/sdhci-of-aspeed.c
> +++ b/drivers/mmc/host/sdhci-of-aspeed.c
> @@ -547,8 +547,7 @@ static int aspeed_sdc_probe(struct platform_device *pdev)
>  		return ret;
>  	}
>  
> -	sdc->res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	sdc->regs = devm_ioremap_resource(&pdev->dev, sdc->res);
> +	sdc->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &sdc->res);
>  	if (IS_ERR(sdc->regs)) {
>  		ret = PTR_ERR(sdc->regs);
>  		goto err_clk;


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] mmc: sdhci-of-aspeed: Use devm_platform_get_and_ioremap_resource()
  2023-03-15  5:50 [PATCH -next] mmc: sdhci-of-aspeed: Use devm_platform_get_and_ioremap_resource() Yang Li
  2023-03-15 10:23 ` Adrian Hunter
@ 2023-03-23 12:12 ` Ulf Hansson
  1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2023-03-23 12:12 UTC (permalink / raw)
  To: Yang Li
  Cc: oel, linux-aspeed, andrew, openbmc, linux-mmc, adrian.hunter,
	linux-kernel, linux-arm-kernel

On Wed, 15 Mar 2023 at 06:50, Yang Li <yang.lee@linux.alibaba.com> wrote:
>
> According to commit 890cc39a8799 ("drivers: provide
> devm_platform_get_and_ioremap_resource()"), 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: Yang Li <yang.lee@linux.alibaba.com>

Applied for next, thanks!

Kind regards
Uffe

> ---
>  drivers/mmc/host/sdhci-of-aspeed.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-of-aspeed.c b/drivers/mmc/host/sdhci-of-aspeed.c
> index ba6677bf7372..25b4073f698b 100644
> --- a/drivers/mmc/host/sdhci-of-aspeed.c
> +++ b/drivers/mmc/host/sdhci-of-aspeed.c
> @@ -547,8 +547,7 @@ static int aspeed_sdc_probe(struct platform_device *pdev)
>                 return ret;
>         }
>
> -       sdc->res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -       sdc->regs = devm_ioremap_resource(&pdev->dev, sdc->res);
> +       sdc->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &sdc->res);
>         if (IS_ERR(sdc->regs)) {
>                 ret = PTR_ERR(sdc->regs);
>                 goto err_clk;
> --
> 2.20.1.7.g153144c
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-23 12:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-15  5:50 [PATCH -next] mmc: sdhci-of-aspeed: Use devm_platform_get_and_ioremap_resource() Yang Li
2023-03-15 10:23 ` Adrian Hunter
2023-03-23 12:12 ` Ulf Hansson

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).