diff options
author | Yangtao Li <tiny.windzz@gmail.com> | 2019-12-15 20:51:18 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2019-12-18 16:55:11 +0300 |
commit | 0a337eb168d6cbb85f6b4eb56d1be55e24c80452 (patch) | |
tree | ac7c9231779fe51163f12d7f2859bf5063eecc0b /drivers/mmc/host/mvsdio.c | |
parent | cb064b50227d158d7c415784ab49f4d5fd1e34ca (diff) | |
download | linux-0a337eb168d6cbb85f6b4eb56d1be55e24c80452.tar.xz |
mmc: mvsdio: convert to devm_platform_ioremap_resource
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Link: https://lore.kernel.org/r/20191215175120.3290-11-tiny.windzz@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/mvsdio.c')
-rw-r--r-- | drivers/mmc/host/mvsdio.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c index 74a0a7fbbf7f..203b61712601 100644 --- a/drivers/mmc/host/mvsdio.c +++ b/drivers/mmc/host/mvsdio.c @@ -696,16 +696,14 @@ static int mvsd_probe(struct platform_device *pdev) struct mmc_host *mmc = NULL; struct mvsd_host *host = NULL; const struct mbus_dram_target_info *dram; - struct resource *r; int ret, irq; if (!np) { dev_err(&pdev->dev, "no DT node\n"); return -ENODEV; } - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); irq = platform_get_irq(pdev, 0); - if (!r || irq < 0) + if (irq < 0) return -ENXIO; mmc = mmc_alloc_host(sizeof(struct mvsd_host), &pdev->dev); @@ -758,7 +756,7 @@ static int mvsd_probe(struct platform_device *pdev) spin_lock_init(&host->lock); - host->base = devm_ioremap_resource(&pdev->dev, r); + host->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(host->base)) { ret = PTR_ERR(host->base); goto out; |