diff options
author | Silviu-Mihai Popescu <silviupopescu1990@gmail.com> | 2013-03-17 12:01:34 +0400 |
---|---|---|
committer | Anton Vorontsov <anton@enomsg.org> | 2013-04-01 10:39:40 +0400 |
commit | a92d4c7d02d0af85b0edbf1d3c12b9e09bf1846d (patch) | |
tree | fa059b22408f7baf63ec2303857de79c9552fa64 /drivers/power/goldfish_battery.c | |
parent | 4b44a1ed82b4c2462d86fede459a802668b19d45 (diff) | |
download | linux-a92d4c7d02d0af85b0edbf1d3c12b9e09bf1846d.tar.xz |
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/goldfish_battery.c')
-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; |