From: Binbin Zhou Date: Sat, 7 Jun 2025 07:35:43 +0000 (+0800) Subject: mmc: sdhci-pltfm: Drop the use of sdhci_pltfm_free() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f192b9b667ff49de5ac663f0d4bcc13a622e02c0;p=thirdparty%2Fkernel%2Fstable.git mmc: sdhci-pltfm: Drop the use of sdhci_pltfm_free() 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 Link: https://lore.kernel.org/r/67e8881bc46f12aadbe82c655ce373b9c6907182.1749127796.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson --- 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);