Commit f538ed9e authored by Wim Van Sebroeck's avatar Wim Van Sebroeck

[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: default avatarWim Van Sebroeck <wim@iguana.be>
parent 66aaa7a5
...@@ -307,6 +307,10 @@ static long ts72xx_wdt_ioctl(struct file *file, unsigned int cmd, ...@@ -307,6 +307,10 @@ static long ts72xx_wdt_ioctl(struct file *file, unsigned int cmd,
error = copy_to_user(argp, &winfo, sizeof(winfo)); error = copy_to_user(argp, &winfo, sizeof(winfo));
break; break;
case WDIOC_GETSTATUS:
case WDIOC_GETBOOTSTATUS:
return put_user(0, p);
case WDIOC_KEEPALIVE: case WDIOC_KEEPALIVE:
ts72xx_wdt_kick(wdt); ts72xx_wdt_kick(wdt);
break; break;
...@@ -477,14 +481,14 @@ static __devexit int ts72xx_wdt_remove(struct platform_device *pdev) ...@@ -477,14 +481,14 @@ static __devexit int ts72xx_wdt_remove(struct platform_device *pdev)
error = misc_deregister(&ts72xx_wdt_miscdev); error = misc_deregister(&ts72xx_wdt_miscdev);
platform_set_drvdata(pdev, NULL); 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); iounmap(wdt->feed_reg);
res = platform_get_resource(pdev, IORESOURCE_MEM, 1); res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
release_mem_region(res->start, resource_size(res)); 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); kfree(wdt);
return error; return error;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment