diff options
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 429ea99eaee5..c6aaf2845741 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) | |||
277 | goto err_busy; | 277 | goto err_busy; |
278 | } | 278 | } |
279 | 279 | ||
280 | mem = request_mem_region(res->start, res->end - res->start + 1, | 280 | mem = request_mem_region(res->start, resource_size(res), pdev->name); |
281 | pdev->name); | ||
282 | if (!mem) { | 281 | if (!mem) { |
283 | ret = -EBUSY; | 282 | ret = -EBUSY; |
284 | goto err_busy; | 283 | goto err_busy; |
@@ -306,7 +305,7 @@ static int __devinit omap_wdt_probe(struct platform_device *pdev) | |||
306 | goto err_clk; | 305 | goto err_clk; |
307 | } | 306 | } |
308 | 307 | ||
309 | wdev->base = ioremap(res->start, res->end - res->start + 1); | 308 | wdev->base = ioremap(res->start, resource_size(res)); |
310 | if (!wdev->base) { | 309 | if (!wdev->base) { |
311 | ret = -ENOMEM; | 310 | ret = -ENOMEM; |
312 | goto err_ioremap; | 311 | goto err_ioremap; |
@@ -358,7 +357,7 @@ err_clk: | |||
358 | kfree(wdev); | 357 | kfree(wdev); |
359 | 358 | ||
360 | err_kzalloc: | 359 | err_kzalloc: |
361 | release_mem_region(res->start, res->end - res->start + 1); | 360 | release_mem_region(res->start, resource_size(res)); |
362 | 361 | ||
363 | err_busy: | 362 | err_busy: |
364 | err_get_resource: | 363 | err_get_resource: |
@@ -383,7 +382,7 @@ static int __devexit omap_wdt_remove(struct platform_device *pdev) | |||
383 | return -ENOENT; | 382 | return -ENOENT; |
384 | 383 | ||
385 | misc_deregister(&(wdev->omap_wdt_miscdev)); | 384 | misc_deregister(&(wdev->omap_wdt_miscdev)); |
386 | release_mem_region(res->start, res->end - res->start + 1); | 385 | release_mem_region(res->start, resource_size(res)); |
387 | platform_set_drvdata(pdev, NULL); | 386 | platform_set_drvdata(pdev, NULL); |
388 | 387 | ||
389 | clk_put(wdev->ick); | 388 | clk_put(wdev->ick); |