Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c9d7710ea2b497784314a916a39d4d390855a557 Commit: c9d7710ea2b497784314a916a39d4d390855a557 Parent: f6e4803969ee93bef6aeeb6aff0f9214547d1bb1 Author: Wim Van Sebroeck <[EMAIL PROTECTED]> AuthorDate: Sat Jan 27 22:07:03 2007 +0100 Committer: Wim Van Sebroeck <[EMAIL PROTECTED]> CommitDate: Sat Jan 27 22:07:03 2007 +0100
[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: Wim Van Sebroeck <[EMAIL PROTECTED]> --- drivers/char/watchdog/ib700wdt.c | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/char/watchdog/ib700wdt.c b/drivers/char/watchdog/ib700wdt.c index d379bf0..3cec679 100644 --- a/drivers/char/watchdog/ib700wdt.c +++ b/drivers/char/watchdog/ib700wdt.c @@ -3,8 +3,8 @@ * * (c) Copyright 2001 Charles Howes <[EMAIL PROTECTED]> * - * Based on advantechwdt.c which is based on acquirewdt.c which - * is based on wdt.c. + * Based on advantechwdt.c which is based on acquirewdt.c which + * is based on wdt.c. * * (c) Copyright 2000-2001 Marek Michalkiewicz <[EMAIL PROTECTED]> * @@ -25,9 +25,9 @@ * * (c) Copyright 1995 Alan Cox <[EMAIL PROTECTED]> * - * 14-Dec-2001 Matt Domsch <[EMAIL PROTECTED]> - * Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT - * Added timeout module option to override default + * 14-Dec-2001 Matt Domsch <[EMAIL PROTECTED]> + * Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT + * Added timeout module option to override default * */ @@ -201,6 +201,7 @@ ibwdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, break; case WDIOC_GETSTATUS: + case WDIOC_GETBOOTSTATUS: return put_user(0, p); case WDIOC_KEEPALIVE: @@ -246,11 +247,12 @@ static int ibwdt_close(struct inode *inode, struct file *file) { spin_lock(&ibwdt_lock); - if (expect_close == 42) + if (expect_close == 42) { ibwdt_disable(); - else + } else { printk(KERN_CRIT PFX "WDT device closed unexpectedly. WDT will not stop!\n"); - + ibwdt_ping(); + } clear_bit(0, &ibwdt_is_open); expect_close = 0; spin_unlock(&ibwdt_lock); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html