提交 c9d7710e 编写于 作者: W Wim Van Sebroeck

[WATCHDOG] ib700wdt.c small clean-up's

* Fix identation
* Add watchdog "mandatory" WDIOC_GETBOOTSTATUS ioctl
* On unexpected close -> since this is considered as
  a write to the watchdog device, make sure we ping a
  last time.
Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
上级 f6e48039
...@@ -201,6 +201,7 @@ ibwdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ...@@ -201,6 +201,7 @@ ibwdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
break; break;
case WDIOC_GETSTATUS: case WDIOC_GETSTATUS:
case WDIOC_GETBOOTSTATUS:
return put_user(0, p); return put_user(0, p);
case WDIOC_KEEPALIVE: case WDIOC_KEEPALIVE:
...@@ -246,11 +247,12 @@ static int ...@@ -246,11 +247,12 @@ static int
ibwdt_close(struct inode *inode, struct file *file) ibwdt_close(struct inode *inode, struct file *file)
{ {
spin_lock(&ibwdt_lock); spin_lock(&ibwdt_lock);
if (expect_close == 42) if (expect_close == 42) {
ibwdt_disable(); ibwdt_disable();
else } else {
printk(KERN_CRIT PFX "WDT device closed unexpectedly. WDT will not stop!\n"); printk(KERN_CRIT PFX "WDT device closed unexpectedly. WDT will not stop!\n");
ibwdt_ping();
}
clear_bit(0, &ibwdt_is_open); clear_bit(0, &ibwdt_is_open);
expect_close = 0; expect_close = 0;
spin_unlock(&ibwdt_lock); spin_unlock(&ibwdt_lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册