projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e048939
)
mmc: tifm_sd: Use devm_mmc_alloc_host() helper
author
Binbin Zhou
<zhoubinbin@loongson.cn>
Tue, 3 Jun 2025 12:27:35 +0000
(20:27 +0800)
committer
Ulf Hansson
<ulf.hansson@linaro.org>
Tue, 24 Jun 2025 10:43:23 +0000
(12:43 +0200)
Use new function devm_mmc_alloc_host() to simplify the code.
Cc: Alex Dubov <oakad@yahoo.com>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link:
https://lore.kernel.org/r/84a31172bb4c26e3ef41f99ebb4c37fa101bfaac.1748933789.git.zhoubinbin@loongson.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/tifm_sd.c
patch
|
blob
|
history
diff --git
a/drivers/mmc/host/tifm_sd.c
b/drivers/mmc/host/tifm_sd.c
index
5e5ec92
..
ac636ef
100644
(file)
--- a/
drivers/mmc/host/tifm_sd.c
+++ b/
drivers/mmc/host/tifm_sd.c
@@
-947,7
+947,7
@@
static int tifm_sd_probe(struct tifm_dev *sock)
return rc;
}
- mmc =
mmc_alloc_host(sizeof(struct tifm_sd), &sock->dev
);
+ mmc =
devm_mmc_alloc_host(&sock->dev, sizeof(*host)
);
if (!mmc)
return -ENOMEM;
@@
-982,10
+982,7
@@
static int tifm_sd_probe(struct tifm_dev *sock)
if (!rc)
rc = mmc_add_host(mmc);
- if (!rc)
- return 0;
- mmc_free_host(mmc);
return rc;
}
@@
-1015,8
+1012,6
@@
static void tifm_sd_remove(struct tifm_dev *sock)
spin_unlock_irqrestore(&sock->lock, flags);
mmc_remove_host(mmc);
dev_dbg(&sock->dev, "after remove\n");
-
- mmc_free_host(mmc);
}
#ifdef CONFIG_PM