2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-10 22:54:11 +08:00

mmc: sdhci-pltfm: use devm_ioremap()

Use the managed variant of ioremap().

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
Masahiro Yamada 2016-04-20 11:16:28 +09:00 committed by Ulf Hansson
parent e95f644d8b
commit 6113d81236

View File

@ -160,7 +160,8 @@ struct sdhci_host *sdhci_pltfm_init(struct platform_device *pdev,
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) {
dev_err(&pdev->dev, "failed to remap registers\n");
ret = -ENOMEM;
@ -190,7 +191,6 @@ void sdhci_pltfm_free(struct platform_device *pdev)
{
struct sdhci_host *host = platform_get_drvdata(pdev);
iounmap(host->ioaddr);
sdhci_free_host(host);
}
EXPORT_SYMBOL_GPL(sdhci_pltfm_free);