summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorSilviu-Mihai Popescu <silviupopescu1990@gmail.com>2013-03-17 10:01:34 +0200
committerAnton Vorontsov <anton@enomsg.org>2013-03-31 23:39:40 -0700
commita92d4c7d02d0af85b0edbf1d3c12b9e09bf1846d (patch)
treefa059b22408f7baf63ec2303857de79c9552fa64 /drivers/power
parent4b44a1ed82b4c2462d86fede459a802668b19d45 (diff)
downloadlinux-3.10-a92d4c7d02d0af85b0edbf1d3c12b9e09bf1846d.tar.gz
linux-3.10-a92d4c7d02d0af85b0edbf1d3c12b9e09bf1846d.tar.bz2
linux-3.10-a92d4c7d02d0af85b0edbf1d3c12b9e09bf1846d.zip
goldfish_battery: Use resource_size()
This uses the resource_size() function instead of explicit computation. Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com> Signed-off-by: Andrei Epure <epure.andrei@gmail.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/goldfish_battery.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/goldfish_battery.c b/drivers/power/goldfish_battery.c
index c10f460f986..29eba88a296 100644
--- a/drivers/power/goldfish_battery.c
+++ b/drivers/power/goldfish_battery.c
@@ -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;