summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorYang Li <yang.lee@linux.alibaba.com>2023-03-15 13:31:27 +0800
committerUlf Hansson <ulf.hansson@linaro.org>2023-03-23 11:54:35 +0100
commite3d1672741eda6763426a467e5fe36c7147a139e (patch)
tree7a630787db8b3b179bdf584a9e757497d3bb298b /drivers/mmc
parent220b484fa6e027e6fd296422513f2e7a76f7e6cf (diff)
downloadlinux-stable-e3d1672741eda6763426a467e5fe36c7147a139e.tar.gz
linux-stable-e3d1672741eda6763426a467e5fe36c7147a139e.tar.bz2
linux-stable-e3d1672741eda6763426a467e5fe36c7147a139e.zip
mmc: jz4740: Use devm_platform_get_and_ioremap_resource()
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> Link: https://lore.kernel.org/r/20230315053127.33855-1-yang.lee@linux.alibaba.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/jz4740_mmc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c
index 698450afa7bb..1846a05210e3 100644
--- a/drivers/mmc/host/jz4740_mmc.c
+++ b/drivers/mmc/host/jz4740_mmc.c
@@ -1079,8 +1079,7 @@ static int jz4740_mmc_probe(struct platform_device* pdev)
goto err_free_host;
}
- host->mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- host->base = devm_ioremap_resource(&pdev->dev, host->mem_res);
+ host->base = devm_platform_get_and_ioremap_resource(pdev, 0, &host->mem_res);
if (IS_ERR(host->base)) {
ret = PTR_ERR(host->base);
goto err_free_host;