drivers: power: goldfish: use resource_size()
PATCH 1/1 drivers: power: goldfish: use resource_size()
This uses the resource_size() function instead of explicit computation.
Signed-off-by Silviu-Mihai Popescu <[email protected]>
--- drivers/power/goldfish_battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/goldfish_battery.c +1 -1
@@ -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 ;
Signature · 1 line
1.7.9.5
Anton Vorontsov
AppliedQuoted 4 lines · Silviu-Mihai Popescu
This uses the
resource_size()function instead of explicit computation.Signed-off-by Silviu-Mihai Popescu <[email protected]>---
Applied, thanks!
Anton