From: Binbin Zhou Date: Sat, 7 Jun 2025 07:33:34 +0000 (+0800) Subject: mmc: sdhci: Use devm_mmc_alloc_host() helper X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6fce1182bb095ed5f9d60d39d05435e19aa19f2;p=thirdparty%2Fkernel%2Fstable.git 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 Link: https://lore.kernel.org/r/dcfce3ddf980563c590f82c1b4e8840c29497887.1749127796.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson --- 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);