diff options
author | Rosen Penev <rosenp@gmail.com> | 2024-09-30 15:49:18 -0700 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2024-10-14 12:40:10 +0200 |
commit | 88ef1c63711d4aac42a409451a39a411c0107a86 (patch) | |
tree | f40a9b16d073dfd003b9ab2e52d79bda6698c7d6 | |
parent | 7a2fa8eed936b33b22e49b1d2349cd7d02f22710 (diff) | |
download | linux-88ef1c63711d4aac42a409451a39a411c0107a86.tar.gz linux-88ef1c63711d4aac42a409451a39a411c0107a86.tar.bz2 linux-88ef1c63711d4aac42a409451a39a411c0107a86.zip |
mmc: mtd-sd: use devm_platform_ioremap_resource
My guess is some automated tool missed this transformation. Now looks
clearer as do what's happening. Also allows removal of struct resource.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://lore.kernel.org/r/20240930224919.355359-3-rosenp@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r-- | drivers/mmc/host/mtk-sd.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c index b9b4a832a15f..41ad650a6d1c 100644 --- a/drivers/mmc/host/mtk-sd.c +++ b/drivers/mmc/host/mtk-sd.c @@ -2752,7 +2752,6 @@ static int msdc_drv_probe(struct platform_device *pdev) { struct mmc_host *mmc; struct msdc_host *host; - struct resource *res; int ret; if (!pdev->dev.of_node) { @@ -2774,12 +2773,9 @@ static int msdc_drv_probe(struct platform_device *pdev) if (IS_ERR(host->base)) return PTR_ERR(host->base); - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - if (res) { - host->top_base = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(host->top_base)) - host->top_base = NULL; - } + host->top_base = devm_platform_ioremap_resource(pdev, 1); + if (IS_ERR(host->top_base)) + host->top_base = NULL; ret = mmc_regulator_get_supply(mmc); if (ret) |