From: Rosen Penev Date: Mon, 30 Sep 2024 22:49:18 +0000 (-0700) Subject: mmc: mtd-sd: use devm_platform_ioremap_resource X-Git-Tag: v6.13-rc1~153^2~51 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=88ef1c63711d4aac42a409451a39a411c0107a86;p=thirdparty%2Flinux.git 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 Link: https://lore.kernel.org/r/20240930224919.355359-3-rosenp@gmail.com Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c index b9b4a832a15fb..41ad650a6d1c0 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)