Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a92d4c7d authored by Silviu-Mihai Popescu's avatar Silviu-Mihai Popescu Committed by Anton Vorontsov
Browse files

goldfish_battery: Use resource_size()



This uses the resource_size() function instead of explicit computation.

Signed-off-by: default avatarSilviu-Mihai Popescu <silviupopescu1990@gmail.com>
Signed-off-by: default avatarAndrei Epure <epure.andrei@gmail.com>
Signed-off-by: default avatarAnton Vorontsov <anton@enomsg.org>
parent 4b44a1ed
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;