From: Binbin Zhou Date: Tue, 3 Jun 2025 12:28:03 +0000 (+0800) Subject: mmc: wbsd: Use devm_mmc_alloc_host() helper X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51b8ca24f82be059c2641384d55f1062e913057c;p=thirdparty%2Fkernel%2Fstable.git mmc: wbsd: Use devm_mmc_alloc_host() helper Use new function devm_mmc_alloc_host() to simplify the code. Cc: Pierre Ossman Reviewed-by: Huacai Chen Signed-off-by: Binbin Zhou Link: https://lore.kernel.org/r/1d1d31ac2d6aff5325748693cb1551d7ae21de30.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson --- 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); } /*