mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 14:42:08 +02:00
mmc: bcm2835: Use devm_mmc_alloc_host() helper
Use new function devm_mmc_alloc_host() to simplify the code. Cc: Florian Fainelli <florian.fainelli@broadcom.com> Cc: Ray Jui <rjui@broadcom.com> Cc: Scott Branden <sbranden@broadcom.com> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/37a95baec1889f906134deb2dc761a98e950dcd1.1748933789.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
parent
16ca54d052
commit
5f0aa2f725
|
|
@ -1371,7 +1371,7 @@ static int bcm2835_probe(struct platform_device *pdev)
|
|||
int ret;
|
||||
|
||||
dev_dbg(dev, "%s\n", __func__);
|
||||
mmc = mmc_alloc_host(sizeof(*host), dev);
|
||||
mmc = devm_mmc_alloc_host(dev, sizeof(*host));
|
||||
if (!mmc)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
@ -1450,7 +1450,6 @@ static int bcm2835_probe(struct platform_device *pdev)
|
|||
dev_dbg(dev, "%s -> err %d\n", __func__, ret);
|
||||
if (host->dma_chan_rxtx)
|
||||
dma_release_channel(host->dma_chan_rxtx);
|
||||
mmc_free_host(mmc);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -1473,8 +1472,6 @@ static void bcm2835_remove(struct platform_device *pdev)
|
|||
|
||||
if (host->dma_chan_rxtx)
|
||||
dma_release_channel(host->dma_chan_rxtx);
|
||||
|
||||
mmc_free_host(mmc);
|
||||
}
|
||||
|
||||
static const struct of_device_id bcm2835_match[] = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user