Skip to content

Commit ccce27c

Browse files
committed
Pull watchdog fixes from Wim Van Sebroeck: "This fixes: - the WDIOC_GETSTATUS return value - the unregister of all NMI events on exit - the loading of the iTCO_wdt driver after the conversion to the lpc_ich mfd model." * git://www.linux-watchdog.org/linux-watchdog: watchdog: core: fix WDIOC_GETSTATUS return value watchdog: hpwdt: Unregister NMI events on exit. watchdog: iTCO_wdt: add platform driver module alias
2 parents 221d3eb + 8b9468d commit ccce27c

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

drivers/watchdog/hpwdt.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ struct cmn_registers {
146146
} __attribute__((packed));
147147

148148
static unsigned int hpwdt_nmi_decoding;
149-
static unsigned int allow_kdump;
149+
static unsigned int allow_kdump = 1;
150150
static unsigned int is_icru;
151151
static DEFINE_SPINLOCK(rom_lock);
152152
static void *cru_rom_addr;
@@ -756,6 +756,8 @@ static int __devinit hpwdt_init_nmi_decoding(struct pci_dev *dev)
756756
static void hpwdt_exit_nmi_decoding(void)
757757
{
758758
unregister_nmi_handler(NMI_UNKNOWN, "hpwdt");
759+
unregister_nmi_handler(NMI_SERR, "hpwdt");
760+
unregister_nmi_handler(NMI_IO_CHECK, "hpwdt");
759761
if (cru_rom_addr)
760762
iounmap(cru_rom_addr);
761763
}

drivers/watchdog/iTCO_wdt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,3 +699,4 @@ MODULE_DESCRIPTION("Intel TCO WatchDog Timer Driver");
699699
MODULE_VERSION(DRV_VERSION);
700700
MODULE_LICENSE("GPL");
701701
MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
702+
MODULE_ALIAS("platform:" DRV_NAME);

drivers/watchdog/watchdog_dev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd,
349349
sizeof(struct watchdog_info)) ? -EFAULT : 0;
350350
case WDIOC_GETSTATUS:
351351
err = watchdog_get_status(wdd, &val);
352-
if (err)
352+
if (err == -ENODEV)
353353
return err;
354354
return put_user(val, p);
355355
case WDIOC_GETBOOTSTATUS:

0 commit comments

Comments
 (0)