提交 a92d4c7d 编写于 作者: S Silviu-Mihai Popescu 提交者: Anton Vorontsov

goldfish_battery: Use resource_size()

This uses the resource_size() function instead of explicit computation.
Signed-off-by: NSilviu-Mihai Popescu <silviupopescu1990@gmail.com>
Signed-off-by: NAndrei Epure <epure.andrei@gmail.com>
Signed-off-by: NAnton Vorontsov <anton@enomsg.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册