aboutsummaryrefslogtreecommitdiff
path: root/drivers/watchdog/txx9wdt.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2009-12-04 12:24:04 -0500
committerWim Van Sebroeck <wim@iguana.be>2009-12-23 19:53:04 +0000
commitb782a563758ac963c794d9fbaaff494140c28fd6 (patch)
tree8e1ac3537fc1f6e0ab47e82892ae941e563fd8ab /drivers/watchdog/txx9wdt.c
parent4946f8353da9d3038e2a9d0295d5dfeee4cee5c5 (diff)
[WATCHDOG] use resource_size()
Use resource_size(). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Kevin Hilman <khilman@deeprootsystems.com> Cc: Kevin Hilman <khilman@ti.deeprootsystems.com> Cc: Ulrik Bech Hald <ubh@ti.com> Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Cc: Ming Lei <tom.leiming@gmail.com> Cc: Vincent Sanders <support@simtec.co.uk> Acked-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers/watchdog/txx9wdt.c')
-rw-r--r--drivers/watchdog/txx9wdt.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/watchdog/txx9wdt.c b/drivers/watchdog/txx9wdt.c
index 6adab77fbbb..d635566e930 100644
--- a/drivers/watchdog/txx9wdt.c
+++ b/drivers/watchdog/txx9wdt.c
@@ -214,12 +214,10 @@ static int __init txx9wdt_probe(struct platform_device *dev)
res = platform_get_resource(dev, IORESOURCE_MEM, 0);
if (!res)
goto exit_busy;
- if (!devm_request_mem_region(&dev->dev,
- res->start, res->end - res->start + 1,
+ if (!devm_request_mem_region(&dev->dev, res->start, resource_size(res),
"txx9wdt"))
goto exit_busy;
- txx9wdt_reg = devm_ioremap(&dev->dev,
- res->start, res->end - res->start + 1);
+ txx9wdt_reg = devm_ioremap(&dev->dev, res->start, resource_size(res));
if (!txx9wdt_reg)
goto exit_busy;