diff mbox series

[v2,07/35] mmc: sdhci-pltfm: Drop the use of sdhci_pltfm_free()

Message ID 75e3f5ecb5e7c3ec182e678a00286b4e388a187a.1748515612.git.zhoubinbin@loongson.cn
State New
Headers show
Series mmc: Cleanup sdhci_pltfm_free()/sdhci_free_host() usage | expand

Commit Message

Binbin Zhou May 29, 2025, 12:58 p.m. UTC
Since the devm_mmc_alloc_host() helper is already in use,
sdhci_pltfm_free() is no longer needed.

To avoid causing drivers that still use sdhci_pltfm_free() to fail to
compile, it has been temporarily set to empty. And it will be removed
when there are no longer any callers.

Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
---
 drivers/mmc/host/sdhci-pltfm.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
index 62753d72198a..aedbcd32713a 100644
--- a/drivers/mmc/host/sdhci-pltfm.c
+++ b/drivers/mmc/host/sdhci-pltfm.c
@@ -148,9 +148,6 @@  EXPORT_SYMBOL_GPL(sdhci_pltfm_init);
 
 void sdhci_pltfm_free(struct platform_device *pdev)
 {
-	struct sdhci_host *host = platform_get_drvdata(pdev);
-
-	sdhci_free_host(host);
 }
 EXPORT_SYMBOL_GPL(sdhci_pltfm_free);
 
@@ -159,7 +156,6 @@  int sdhci_pltfm_init_and_add_host(struct platform_device *pdev,
 				  size_t priv_size)
 {
 	struct sdhci_host *host;
-	int ret = 0;
 
 	host = sdhci_pltfm_init(pdev, pdata, priv_size);
 	if (IS_ERR(host))
@@ -167,11 +163,7 @@  int sdhci_pltfm_init_and_add_host(struct platform_device *pdev,
 
 	sdhci_get_property(pdev);
 
-	ret = sdhci_add_host(host);
-	if (ret)
-		sdhci_pltfm_free(pdev);
-
-	return ret;
+	return sdhci_add_host(host);
 }
 EXPORT_SYMBOL_GPL(sdhci_pltfm_init_and_add_host);
 
@@ -181,7 +173,6 @@  void sdhci_pltfm_remove(struct platform_device *pdev)
 	int dead = (readl(host->ioaddr + SDHCI_INT_STATUS) == 0xffffffff);
 
 	sdhci_remove_host(host, dead);
-	sdhci_pltfm_free(pdev);
 }
 EXPORT_SYMBOL_GPL(sdhci_pltfm_remove);