diff options
| author | Binbin Zhou <[email protected]> | 2025-06-03 12:25:35 +0000 |
|---|---|---|
| committer | Ulf Hansson <[email protected]> | 2025-06-24 10:43:22 +0000 |
| commit | 1f150edbea35a18622a560e236aa1ab8262fbf1c (patch) | |
| tree | 939a6b6591b18bfb6567635469ac172a1af3e0af | |
| parent | mmc: cavium: Use devm_mmc_alloc_host() helper (diff) | |
| download | kernel-1f150edbea35a18622a560e236aa1ab8262fbf1c.tar.gz kernel-1f150edbea35a18622a560e236aa1ab8262fbf1c.zip | |
mmc: cb710: Use devm_mmc_alloc_host() helper
Use new function devm_mmc_alloc_host() to simplify the code.
Cc: Michał Mirosław <[email protected]>
Acked-by: Michał Mirosław <[email protected]>
Reviewed-by: Huacai Chen <[email protected]>
Signed-off-by: Binbin Zhou <[email protected]>
Link: https://lore.kernel.org/r/4ef97a91053fe8819c651f7968fb56209faa36d8.1748933789.git.zhoubinbin@loongson.cn
Signed-off-by: Ulf Hansson <[email protected]>
| -rw-r--r-- | drivers/mmc/host/cb710-mmc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/mmc/host/cb710-mmc.c b/drivers/mmc/host/cb710-mmc.c index d741c1f9cf87..8787e7f49e94 100644 --- a/drivers/mmc/host/cb710-mmc.c +++ b/drivers/mmc/host/cb710-mmc.c @@ -692,7 +692,7 @@ static int cb710_mmc_init(struct platform_device *pdev) int err; u32 val; - mmc = mmc_alloc_host(sizeof(*reader), cb710_slot_dev(slot)); + mmc = devm_mmc_alloc_host(cb710_slot_dev(slot), sizeof(*reader)); if (!mmc) return -ENOMEM; @@ -741,7 +741,6 @@ err_free_mmc: dev_dbg(cb710_slot_dev(slot), "mmc_add_host() failed: %d\n", err); cb710_set_irq_handler(slot, NULL); - mmc_free_host(mmc); return err; } @@ -764,8 +763,6 @@ static void cb710_mmc_exit(struct platform_device *pdev) cb710_write_port_16(slot, CB710_MMC_CONFIGB_PORT, 0); cancel_work_sync(&reader->finish_req_bh_work); - - mmc_free_host(mmc); } static struct platform_driver cb710_mmc_driver = { |
