mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
goldfish_battery: Use resource_size()
This uses the resource_size() function instead of explicit computation. Signed-off-by: Silviu-Mihai Popescu <[email protected]> Signed-off-by: Andrei Epure <[email protected]> Signed-off-by: Anton Vorontsov <[email protected]>
This commit is contained in:
parent
4b44a1ed82
commit
a92d4c7d02
1 changed files with 1 additions and 1 deletions
|
|
@ -178,7 +178,7 @@ static int goldfish_battery_probe(struct platform_device *pdev)
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
data->reg_base = devm_ioremap(&pdev->dev, r->start, r->end - r->start + 1);
|
||||
data->reg_base = devm_ioremap(&pdev->dev, r->start, resource_size(r));
|
||||
if (data->reg_base == NULL) {
|
||||
dev_err(&pdev->dev, "unable to remap MMIO\n");
|
||||
return -ENOMEM;
|
||||
|
|
|
|||
Loading…
Reference in a new issue