diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2009-12-04 12:24:04 -0500 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2009-12-23 19:53:04 +0000 |
commit | b782a563758ac963c794d9fbaaff494140c28fd6 (patch) | |
tree | 8e1ac3537fc1f6e0ab47e82892ae941e563fd8ab /drivers/watchdog/omap_wdt.c | |
parent | 4946f8353da9d3038e2a9d0295d5dfeee4cee5c5 (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/omap_wdt.c')
-rw-r--r-- | drivers/watchdog/omap_wdt.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c index 429ea99eaee..c6aaf284574 100644 --- a/drivers/watchdog/omap_wdt.c +++ b/drivers/watchdog/omap_wdt.c @@ -277,8 +277,7 @@ static int __devinit omap_wdt_probe(struct platform_device *pdev) goto err_busy; } - mem = request_mem_region(res->start, res->end - res->start + 1, - pdev->name); + mem = request_mem_region(res->start, resource_size(res), pdev->name); if (!mem) { ret = -EBUSY; goto err_busy; @@ -306,7 +305,7 @@ static int __devinit omap_wdt_probe(struct platform_device *pdev) goto err_clk; } - wdev->base = ioremap(res->start, res->end - res->start + 1); + wdev->base = ioremap(res->start, resource_size(res)); if (!wdev->base) { ret = -ENOMEM; goto err_ioremap; @@ -358,7 +357,7 @@ err_clk: kfree(wdev); err_kzalloc: - release_mem_region(res->start, res->end - res->start + 1); + release_mem_region(res->start, resource_size(res)); err_busy: err_get_resource: @@ -383,7 +382,7 @@ static int __devexit omap_wdt_remove(struct platform_device *pdev) return -ENOENT; misc_deregister(&(wdev->omap_wdt_miscdev)); - release_mem_region(res->start, res->end - res->start + 1); + release_mem_region(res->start, resource_size(res)); platform_set_drvdata(pdev, NULL); clk_put(wdev->ick); |