mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-20 02:34:23 +08:00
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>
This commit is contained in:
parent
cfbeb59c7a
commit
6a966e0609
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user