aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBinbin Zhou <zhoubinbin@loongson.cn>2025-06-07 15:33:34 +0800
committerUlf Hansson <ulf.hansson@linaro.org>2025-06-24 12:43:24 +0200
commitf6fce1182bb095ed5f9d60d39d05435e19aa19f2 (patch)
tree27376dad914e22b57ecca9c8e3929dbb202382ba
parentmmc: mmc_spi: Use devm_mmc_alloc_host() helper (diff)
downloadlinux-f6fce1182bb095ed5f9d60d39d05435e19aa19f2.tar.gz
linux-f6fce1182bb095ed5f9d60d39d05435e19aa19f2.zip
mmc: sdhci: Use devm_mmc_alloc_host() helper
Use new function devm_mmc_alloc_host() to simplify the code. Although sdhci_free_host() is no longer needed, to avoid drivers that still use this function from failing to compile, sdhci_free_host() is temporarily set to empty. Finally, it will be removed when there are no more callers. Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/dcfce3ddf980563c590f82c1b4e8840c29497887.1749127796.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/mmc/host/sdhci.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index d171c8877027..fcda2d17c4a4 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -4072,7 +4072,7 @@ struct sdhci_host *sdhci_alloc_host(struct device *dev,
WARN_ON(dev == NULL);
- mmc = mmc_alloc_host(sizeof(struct sdhci_host) + priv_size, dev);
+ mmc = devm_mmc_alloc_host(dev, sizeof(struct sdhci_host) + priv_size);
if (!mmc)
return ERR_PTR(-ENOMEM);
@@ -4998,7 +4998,6 @@ EXPORT_SYMBOL_GPL(sdhci_remove_host);
void sdhci_free_host(struct sdhci_host *host)
{
- mmc_free_host(host->mmc);
}
EXPORT_SYMBOL_GPL(sdhci_free_host);