diff options
author | Silviu-Mihai Popescu <silviupopescu1990@gmail.com> | 2013-03-17 04:01:34 -0400 |
---|---|---|
committer | Anton Vorontsov <anton@enomsg.org> | 2013-04-01 02:39:40 -0400 |
commit | a92d4c7d02d0af85b0edbf1d3c12b9e09bf1846d (patch) | |
tree | fa059b22408f7baf63ec2303857de79c9552fa64 | |
parent | 4b44a1ed82b4c2462d86fede459a802668b19d45 (diff) |
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>
-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) | |||
178 | return -ENODEV; | 178 | return -ENODEV; |
179 | } | 179 | } |
180 | 180 | ||
181 | data->reg_base = devm_ioremap(&pdev->dev, r->start, r->end - r->start + 1); | 181 | data->reg_base = devm_ioremap(&pdev->dev, r->start, resource_size(r)); |
182 | if (data->reg_base == NULL) { | 182 | if (data->reg_base == NULL) { |
183 | dev_err(&pdev->dev, "unable to remap MMIO\n"); | 183 | dev_err(&pdev->dev, "unable to remap MMIO\n"); |
184 | return -ENOMEM; | 184 | return -ENOMEM; |