diff options
| author | Silviu-Mihai Popescu <silviupopescu1990@gmail.com> | 2013-03-12 14:21:26 -0400 |
|---|---|---|
| committer | Chris Ball <cjb@laptop.org> | 2013-03-22 12:53:52 -0400 |
| commit | 6a966e060978c82cf6d0baf3c200cbd4f692dc97 (patch) | |
| tree | dd1d17f878698a66e8ce5d89e4dee80e2d03e17b | |
| parent | cfbeb59c7a818a2ec0008914ce479fe5d6f5978b (diff) | |
mmc: android-goldfish: use resource_size()
Use resource_size() instead of explicit calculation. This was found via
make coccicheck.
Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
| -rw-r--r-- | drivers/mmc/host/android-goldfish.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/android-goldfish.c b/drivers/mmc/host/android-goldfish.c index ef3aef0f376d..7780c14704c4 100644 --- a/drivers/mmc/host/android-goldfish.c +++ b/drivers/mmc/host/android-goldfish.c | |||
| @@ -476,7 +476,7 @@ static int goldfish_mmc_probe(struct platform_device *pdev) | |||
| 476 | host->mmc = mmc; | 476 | host->mmc = mmc; |
| 477 | 477 | ||
| 478 | pr_err("mmc: Mapping %lX to %lX\n", (long)res->start, (long)res->end); | 478 | pr_err("mmc: Mapping %lX to %lX\n", (long)res->start, (long)res->end); |
| 479 | host->reg_base = ioremap(res->start, res->end - res->start + 1); | 479 | host->reg_base = ioremap(res->start, resource_size(res)); |
| 480 | if (host->reg_base == NULL) { | 480 | if (host->reg_base == NULL) { |
| 481 | ret = -ENOMEM; | 481 | ret = -ENOMEM; |
| 482 | goto ioremap_failed; | 482 | goto ioremap_failed; |
