aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/wbsd.c
diff options
context:
space:
mode:
authorBinbin Zhou <zhoubinbin@loongson.cn>2025-06-03 20:28:03 +0800
committerUlf Hansson <ulf.hansson@linaro.org>2025-06-24 12:43:24 +0200
commit51b8ca24f82be059c2641384d55f1062e913057c (patch)
tree8a24c5e73ad4e96aef605e483a21d3680910b369 /drivers/mmc/host/wbsd.c
parentmmc: vub300: Use devm_mmc_alloc_host() helper (diff)
downloadlinux-51b8ca24f82be059c2641384d55f1062e913057c.tar.gz
linux-51b8ca24f82be059c2641384d55f1062e913057c.zip
mmc: wbsd: Use devm_mmc_alloc_host() helper
Use new function devm_mmc_alloc_host() to simplify the code. Cc: Pierre Ossman <pierre@ossman.eu> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/1d1d31ac2d6aff5325748693cb1551d7ae21de30.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/wbsd.c')
-rw-r--r--drivers/mmc/host/wbsd.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c
index 2ae787d966de..c33a0223ce7f 100644
--- a/drivers/mmc/host/wbsd.c
+++ b/drivers/mmc/host/wbsd.c
@@ -1190,7 +1190,7 @@ static int wbsd_alloc_mmc(struct device *dev)
/*
* Allocate MMC structure.
*/
- mmc = mmc_alloc_host(sizeof(struct wbsd_host), dev);
+ mmc = devm_mmc_alloc_host(dev, sizeof(*host));
if (!mmc)
return -ENOMEM;
@@ -1262,8 +1262,6 @@ static void wbsd_free_mmc(struct device *dev)
BUG_ON(host == NULL);
timer_delete_sync(&host->ignore_timer);
-
- mmc_free_host(mmc);
}
/*