From: Silviu-Mihai Popescu Date: Sun, 17 Mar 2013 08:01:34 +0000 (+0200) Subject: goldfish_battery: Use resource_size() X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=a92d4c7d02d0af85b0edbf1d3c12b9e09bf1846d;p=deliverable%2Flinux.git goldfish_battery: Use resource_size() This uses the resource_size() function instead of explicit computation. Signed-off-by: Silviu-Mihai Popescu Signed-off-by: Andrei Epure Signed-off-by: Anton Vorontsov --- 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;