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:
1fdbbdb
)
mmc: ushc: Use devm_mmc_alloc_host() helper
author
Binbin Zhou
<zhoubinbin@loongson.cn>
Tue, 3 Jun 2025 12:27:52 +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.
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link:
https://lore.kernel.org/r/dde4d49481fe0cc6bd3289e9bd4b33433eb27cea.1748933789.git.zhoubinbin@loongson.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/ushc.c
patch
|
blob
|
history
diff --git
a/drivers/mmc/host/ushc.c
b/drivers/mmc/host/ushc.c
index
9a6358f
..
2b7456e
100644
(file)
--- a/
drivers/mmc/host/ushc.c
+++ b/
drivers/mmc/host/ushc.c
@@
-404,8
+404,6
@@
static void ushc_clean_up(struct ushc_data *ushc)
kfree(ushc->int_data);
kfree(ushc->cbw);
kfree(ushc->csw);
-
- mmc_free_host(ushc->mmc);
}
static const struct mmc_host_ops ushc_ops = {
@@
-425,7
+423,7
@@
static int ushc_probe(struct usb_interface *intf, const struct usb_device_id *id
if (intf->cur_altsetting->desc.bNumEndpoints < 1)
return -ENODEV;
- mmc =
mmc_alloc_host(sizeof(struct ushc_data), &intf->dev
);
+ mmc =
devm_mmc_alloc_host(&intf->dev, sizeof(*ushc)
);
if (mmc == NULL)
return -ENOMEM;
ushc = mmc_priv(mmc);