From: Yangtao Li Date: Sun, 15 Dec 2019 17:51:12 +0000 (+0000) Subject: mmc: sdhci-spear: convert to devm_platform_ioremap_resource X-Git-Tag: v5.10.7~3432^2~57 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b47c43f68e465782444e8be88650b54c8fd10ed4;p=platform%2Fkernel%2Flinux-rpi.git mmc: sdhci-spear: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20191215175120.3290-5-tiny.windzz@gmail.com Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c index 141dd38..b4b6308 100644 --- a/drivers/mmc/host/sdhci-spear.c +++ b/drivers/mmc/host/sdhci-spear.c @@ -43,7 +43,6 @@ static const struct sdhci_ops sdhci_pltfm_ops = { static int sdhci_probe(struct platform_device *pdev) { struct sdhci_host *host; - struct resource *iomem; struct spear_sdhci *sdhci; struct device *dev; int ret; @@ -56,8 +55,7 @@ static int sdhci_probe(struct platform_device *pdev) goto err; } - iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - host->ioaddr = devm_ioremap_resource(&pdev->dev, iomem); + host->ioaddr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(host->ioaddr)) { ret = PTR_ERR(host->ioaddr); dev_dbg(&pdev->dev, "unable to map iomem: %d\n", ret);