Commit a92d4c7d authored by Silviu-Mihai Popescu's avatar Silviu-Mihai Popescu Committed by Anton Vorontsov

goldfish_battery: Use resource_size()

This uses the resource_size() function instead of explicit computation.
Signed-off-by: default avatarSilviu-Mihai Popescu <silviupopescu1990@gmail.com>
Signed-off-by: default avatarAndrei Epure <epure.andrei@gmail.com>
Signed-off-by: default avatarAnton Vorontsov <anton@enomsg.org>
parent 4b44a1ed
......@@ -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;
......
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