Skip to content

Commit

Permalink
goldfish_battery: Use resource_size()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Silviu-Mihai Popescu authored and Anton Vorontsov committed Apr 1, 2013
1 parent 4b44a1e commit a92d4c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/power/goldfish_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a92d4c7

Please sign in to comment.