mmc: sunxi-mmc: convert to devm_platform_ioremap_resource
authorYangtao Li <tiny.windzz@gmail.com>
Sun, 15 Dec 2019 17:51:08 +0000 (17:51 +0000)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 18 Dec 2019 13:46:06 +0000 (14:46 +0100)
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>
Link: https://lore.kernel.org/r/20191215175120.3290-1-tiny.windzz@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sunxi-mmc.c

index d577a6b..f87d796 100644 (file)
@@ -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);