summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/tmio_mmc_core.c
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2017-11-24 19:24:40 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2017-12-18 15:56:57 +0300
commit4139696b7978d57ec840b6c9293d4709a46af3bd (patch)
tree7fc55b23017ef45aeeb3a0a340728d94e6e451b4 /drivers/mmc/host/tmio_mmc_core.c
parenta3b05373e0e06dcb04adf2c50b58cd3feb5f8294 (diff)
downloadlinux-4139696b7978d57ec840b6c9293d4709a46af3bd.tar.xz
mmc: tmio: use devm_ioremap_resource() instead of devm_ioremap()
The TMIO core misses to call request_mem_region(). devm_ioremap_resource() takes care of it and makes the code cleaner. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/tmio_mmc_core.c')
-rw-r--r--drivers/mmc/host/tmio_mmc_core.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
index 8787a996f6a5..151a542b75d5 100644
--- a/drivers/mmc/host/tmio_mmc_core.c
+++ b/drivers/mmc/host/tmio_mmc_core.c
@@ -1185,8 +1185,9 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host,
_host->write16_hook = NULL;
res_ctl = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res_ctl)
- return -EINVAL;
+ _host->ctl = devm_ioremap_resource(&pdev->dev, res_ctl);
+ if (IS_ERR(_host->ctl))
+ return PTR_ERR(_host->ctl);
ret = mmc_of_parse(mmc);
if (ret < 0)
@@ -1202,11 +1203,6 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host,
if (ret < 0)
return ret;
- _host->ctl = devm_ioremap(&pdev->dev,
- res_ctl->start, resource_size(res_ctl));
- if (!_host->ctl)
- return -ENOMEM;
-
tmio_mmc_ops.card_busy = _host->card_busy;
tmio_mmc_ops.start_signal_voltage_switch =
_host->start_signal_voltage_switch;