mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
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>
This commit is contained in:
parent
71f118b427
commit
f6fce1182b
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user