aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/ts72xx_wdt.c
diff options
context:
space:
mode:
authorWim Van Sebroeck <wim@iguana.be>2010-02-10 14:34:05 -0500
committerWim Van Sebroeck <wim@iguana.be>2010-03-06 10:12:40 -0500
commitf538ed9ea0a54ba2121f35f52d63e4025c534909 (patch)
treee8cd971f4924c7823f42fea2c5d0551d377a8db0 /drivers/watchdog/ts72xx_wdt.c
parent66aaa7a5592c0d8ca768c77d15d561bd43f514d8 (diff)
[WATCHDOG] ep93xx: watchdog timer driver for TS-72xx SBCs cleanup
Clean-up driver: * make release the reverse of probe so that both are consistent * add WDIOC_GETSTATUS & WDIOC_GETBOOTSTATUS ioctls. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/ts72xx_wdt.c')
-rw-r--r--drivers/watchdog/ts72xx_wdt.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/watchdog/ts72xx_wdt.c b/drivers/watchdog/ts72xx_wdt.c
index c4a4d37f85af..565a2c3321e5 100644
--- a/drivers/watchdog/ts72xx_wdt.c
+++ b/drivers/watchdog/ts72xx_wdt.c
@@ -307,6 +307,10 @@ static long ts72xx_wdt_ioctl(struct file *file, unsigned int cmd,
307 error = copy_to_user(argp, &winfo, sizeof(winfo)); 307 error = copy_to_user(argp, &winfo, sizeof(winfo));
308 break; 308 break;
309 309
310 case WDIOC_GETSTATUS:
311 case WDIOC_GETBOOTSTATUS:
312 return put_user(0, p);
313
310 case WDIOC_KEEPALIVE: 314 case WDIOC_KEEPALIVE:
311 ts72xx_wdt_kick(wdt); 315 ts72xx_wdt_kick(wdt);
312 break; 316 break;
@@ -477,14 +481,14 @@ static __devexit int ts72xx_wdt_remove(struct platform_device *pdev)
477 error = misc_deregister(&ts72xx_wdt_miscdev); 481 error = misc_deregister(&ts72xx_wdt_miscdev);
478 platform_set_drvdata(pdev, NULL); 482 platform_set_drvdata(pdev, NULL);
479 483
480 iounmap(wdt->control_reg);
481 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
482 release_mem_region(res->start, resource_size(res));
483
484 iounmap(wdt->feed_reg); 484 iounmap(wdt->feed_reg);
485 res = platform_get_resource(pdev, IORESOURCE_MEM, 1); 485 res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
486 release_mem_region(res->start, resource_size(res)); 486 release_mem_region(res->start, resource_size(res));
487 487
488 iounmap(wdt->control_reg);
489 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
490 release_mem_region(res->start, resource_size(res));
491
488 kfree(wdt); 492 kfree(wdt);
489 return error; 493 return error;
490} 494}