* [PATCH] drivers: power: goldfish: use resource_size()
@ 2013-03-17 8:01 Silviu-Mihai Popescu
2013-04-01 6:38 ` Anton Vorontsov
0 siblings, 1 reply; 2+ messages in thread
From: Silviu-Mihai Popescu @ 2013-03-17 8:01 UTC (permalink / raw)
To: linux-kernel; +Cc: cbou, dwmw2, Silviu-Mihai Popescu
This uses the resource_size() function instead of explicit computation.
Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
---
drivers/power/goldfish_battery.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/power/goldfish_battery.c b/drivers/power/goldfish_battery.c
index c10f460..29eba88 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;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drivers: power: goldfish: use resource_size()
2013-03-17 8:01 [PATCH] drivers: power: goldfish: use resource_size() Silviu-Mihai Popescu
@ 2013-04-01 6:38 ` Anton Vorontsov
0 siblings, 0 replies; 2+ messages in thread
From: Anton Vorontsov @ 2013-04-01 6:38 UTC (permalink / raw)
To: Silviu-Mihai Popescu; +Cc: linux-kernel, dwmw2
On Sun, Mar 17, 2013 at 10:01:34AM +0200, Silviu-Mihai Popescu wrote:
> This uses the resource_size() function instead of explicit computation.
>
> Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
> ---
Applied, thanks!
Anton
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-04-01 6:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-17 8:01 [PATCH] drivers: power: goldfish: use resource_size() Silviu-Mihai Popescu
2013-04-01 6:38 ` Anton Vorontsov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox