diff options
author | Wim Van Sebroeck <wim@iguana.be> | 2010-02-10 19:34:05 +0000 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2010-03-06 15:12:40 +0000 |
commit | f538ed9ea0a54ba2121f35f52d63e4025c534909 (patch) | |
tree | e8cd971f4924c7823f42fea2c5d0551d377a8db0 /drivers | |
parent | 66aaa7a5592c0d8ca768c77d15d561bd43f514d8 (diff) | |
download | op-kernel-dev-f538ed9ea0a54ba2121f35f52d63e4025c534909.zip op-kernel-dev-f538ed9ea0a54ba2121f35f52d63e4025c534909.tar.gz |
[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')
-rw-r--r-- | drivers/watchdog/ts72xx_wdt.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/watchdog/ts72xx_wdt.c b/drivers/watchdog/ts72xx_wdt.c index c4a4d37..565a2c3 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, error = copy_to_user(argp, &winfo, sizeof(winfo)); break; + case WDIOC_GETSTATUS: + case WDIOC_GETBOOTSTATUS: + return put_user(0, p); + case WDIOC_KEEPALIVE: ts72xx_wdt_kick(wdt); break; @@ -477,14 +481,14 @@ static __devexit int ts72xx_wdt_remove(struct platform_device *pdev) error = misc_deregister(&ts72xx_wdt_miscdev); platform_set_drvdata(pdev, NULL); - iounmap(wdt->control_reg); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - release_mem_region(res->start, resource_size(res)); - iounmap(wdt->feed_reg); res = platform_get_resource(pdev, IORESOURCE_MEM, 1); release_mem_region(res->start, resource_size(res)); + iounmap(wdt->control_reg); + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + release_mem_region(res->start, resource_size(res)); + kfree(wdt); return error; } |