Skip to content

Commit

Permalink
mmc: android-goldfish: use resource_size()
Browse files Browse the repository at this point in the history
Use resource_size() instead of explicit calculation. This was found via
make coccicheck.

Signed-off-by: Silviu-Mihai Popescu <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
  • Loading branch information
silviupopescu authored and cjb committed Mar 22, 2013
1 parent cfbeb59 commit 6a966e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mmc/host/android-goldfish.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ static int goldfish_mmc_probe(struct platform_device *pdev)
host->mmc = mmc;

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) {
ret = -ENOMEM;
goto ioremap_failed;
Expand Down

0 comments on commit 6a966e0

Please sign in to comment.