Commit 6113d812 authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Ulf Hansson

mmc: sdhci-pltfm: use devm_ioremap()

Use the managed variant of ioremap().
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent e95f644d
...@@ -160,7 +160,8 @@ struct sdhci_host *sdhci_pltfm_init(struct platform_device *pdev, ...@@ -160,7 +160,8 @@ struct sdhci_host *sdhci_pltfm_init(struct platform_device *pdev,
goto err_request; goto err_request;
} }
host->ioaddr = ioremap(iomem->start, resource_size(iomem)); host->ioaddr = devm_ioremap(&pdev->dev, iomem->start,
resource_size(iomem));
if (!host->ioaddr) { if (!host->ioaddr) {
dev_err(&pdev->dev, "failed to remap registers\n"); dev_err(&pdev->dev, "failed to remap registers\n");
ret = -ENOMEM; ret = -ENOMEM;
...@@ -190,7 +191,6 @@ void sdhci_pltfm_free(struct platform_device *pdev) ...@@ -190,7 +191,6 @@ void sdhci_pltfm_free(struct platform_device *pdev)
{ {
struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_host *host = platform_get_drvdata(pdev);
iounmap(host->ioaddr);
sdhci_free_host(host); sdhci_free_host(host);
} }
EXPORT_SYMBOL_GPL(sdhci_pltfm_free); EXPORT_SYMBOL_GPL(sdhci_pltfm_free);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment