diff options
author | Silviu-Mihai Popescu <silviupopescu1990@gmail.com> | 2013-03-17 09:01:34 +0100 |
---|---|---|
committer | Anton Vorontsov <anton@enomsg.org> | 2013-04-01 08:39:40 +0200 |
commit | a92d4c7d02d0af85b0edbf1d3c12b9e09bf1846d (patch) | |
tree | fa059b22408f7baf63ec2303857de79c9552fa64 /drivers/power | |
parent | lp8788-charger: Use PAGE_SIZE for the sysfs read operation (diff) | |
download | linux-a92d4c7d02d0af85b0edbf1d3c12b9e09bf1846d.tar.xz linux-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/goldfish_battery.c b/drivers/power/goldfish_battery.c index c10f460f986f..29eba88a2963 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; |