diff options
author | Yangtao Li <tiny.windzz@gmail.com> | 2019-12-15 17:51:12 +0000 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2019-12-18 14:46:06 +0100 |
commit | b47c43f68e465782444e8be88650b54c8fd10ed4 (patch) | |
tree | c31ee1d216b97fe7a88ac56bab4d0dad33f6bf64 /drivers/mmc | |
parent | 09938ce84c94b7ebf90c85690eb8de7c657465f4 (diff) |
mmc: sdhci-spear: convert to devm_platform_ioremap_resource
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Link: https://lore.kernel.org/r/20191215175120.3290-5-tiny.windzz@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci-spear.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c index 141dd3847411..b4b63089a4e2 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); |