Commit 6a966e06 authored by Silviu-Mihai Popescu's avatar Silviu-Mihai Popescu Committed by Chris Ball

mmc: android-goldfish: use resource_size()

Use resource_size() instead of explicit calculation. This was found via
make coccicheck.
Signed-off-by: default avatarSilviu-Mihai Popescu <silviupopescu1990@gmail.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent cfbeb59c
...@@ -476,7 +476,7 @@ static int goldfish_mmc_probe(struct platform_device *pdev) ...@@ -476,7 +476,7 @@ static int goldfish_mmc_probe(struct platform_device *pdev)
host->mmc = mmc; host->mmc = mmc;
pr_err("mmc: Mapping %lX to %lX\n", (long)res->start, (long)res->end); pr_err("mmc: Mapping %lX to %lX\n", (long)res->start, (long)res->end);
host->reg_base = ioremap(res->start, res->end - res->start + 1); host->reg_base = ioremap(res->start, resource_size(res));
if (host->reg_base == NULL) { if (host->reg_base == NULL) {
ret = -ENOMEM; ret = -ENOMEM;
goto ioremap_failed; goto ioremap_failed;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment