2009-12-04 17:28:35

by Hartley Sweeten

[permalink] [raw]
Subject: davinci_wdt.c: use resource_size()

Use resource_size().

Signed-off-by: H Hartley Sweeten <[email protected]>
Cc: Wim Van Sebroeck <[email protected]>
Cc: Kevin Hilman <[email protected]>

---

diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
index 9d7520f..887136d 100644
--- a/drivers/watchdog/davinci_wdt.c
+++ b/drivers/watchdog/davinci_wdt.c
@@ -221,7 +221,7 @@ static int __devinit davinci_wdt_probe(struct platform_device *pdev)
return -ENOENT;
}

- size = res->end - res->start + 1;
+ size = resource_size(res);
wdt_mem = request_mem_region(res->start, size, pdev->name);

if (wdt_mem == NULL) {