diff mbox series

[01/13] mmc: sunxi-mmc: convert to devm_platform_ioremap_resource

Message ID 20191215175120.3290-1-tiny.windzz@gmail.com (mailing list archive)
State New, archived
Headers show
Series [01/13] mmc: sunxi-mmc: convert to devm_platform_ioremap_resource | expand

Commit Message

Yangtao Li Dec. 15, 2019, 5:51 p.m. UTC
Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/mmc/host/sunxi-mmc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Chen-Yu Tsai Dec. 18, 2019, 2:27 a.m. UTC | #1
On Mon, Dec 16, 2019 at 1:51 AM Yangtao Li <tiny.windzz@gmail.com> wrote:
>
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> ---

Acked-by: Chen-Yu Tsai <wens@csie.org>

>  drivers/mmc/host/sunxi-mmc.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
> index d577a6b0ceae..f87d7967457f 100644
> --- a/drivers/mmc/host/sunxi-mmc.c
> +++ b/drivers/mmc/host/sunxi-mmc.c
> @@ -1273,8 +1273,7 @@ static int sunxi_mmc_resource_request(struct sunxi_mmc_host *host,
>         if (ret)
>                 return ret;
>
> -       host->reg_base = devm_ioremap_resource(&pdev->dev,
> -                             platform_get_resource(pdev, IORESOURCE_MEM, 0));
> +       host->reg_base = devm_platform_ioremap_resource(pdev, 0);
>         if (IS_ERR(host->reg_base))
>                 return PTR_ERR(host->reg_base);
>
> --
> 2.17.1
>
diff mbox series

Patch

diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
index d577a6b0ceae..f87d7967457f 100644
--- a/drivers/mmc/host/sunxi-mmc.c
+++ b/drivers/mmc/host/sunxi-mmc.c
@@ -1273,8 +1273,7 @@  static int sunxi_mmc_resource_request(struct sunxi_mmc_host *host,
 	if (ret)
 		return ret;
 
-	host->reg_base = devm_ioremap_resource(&pdev->dev,
-			      platform_get_resource(pdev, IORESOURCE_MEM, 0));
+	host->reg_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(host->reg_base))
 		return PTR_ERR(host->reg_base);