Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1378409 > unrolled thread

[PATCH 4/7] mmc: sdhci-pltfm: use devm_ioremap()

Started byMasahiro Yamada <yamada.masahiro@socionext.com>
First post2016-04-14 04:40 +0200
Last post2016-04-14 04:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4/7] mmc: sdhci-pltfm: use devm_ioremap() Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-04-14 04:40 +0200

#1378409 — [PATCH 4/7] mmc: sdhci-pltfm: use devm_ioremap()

FromMasahiro Yamada <yamada.masahiro@socionext.com>
Date2016-04-14 04:40 +0200
Subject[PATCH 4/7] mmc: sdhci-pltfm: use devm_ioremap()
Message-ID<rnFmh-2VI-1@gated-at.bofh.it>
Use the managed variant of ioremap().

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/mmc/host/sdhci-pltfm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
index e4da44a..c81a72d 100644
--- a/drivers/mmc/host/sdhci-pltfm.c
+++ b/drivers/mmc/host/sdhci-pltfm.c
@@ -166,7 +166,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;
@@ -196,7 +197,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);
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web