diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-10 14:33:03 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-10 14:33:03 -0700 |
commit | a9deecba19b8f384d97f82c75379da48bccb2588 (patch) | |
tree | ed909c58167b93304e74e67d1e8fcbcc37f4de92 /drivers/char/watchdog/machzwd.c | |
parent | d9de2622bd4fd29cab4ef7db66a9f916cb38e032 (diff) | |
parent | 04bf3b4f5fc033adf921f2e57d034ddbebef5fe7 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
[WATCHDOG] MTX-1 Watchdog driver
[WATCHDOG] s3c2410_wdt - initialize watchdog irq resource
[WATCHDOG] Kconfig menuconfig patch
[WATCHDOG] pcwd.c: Port to the new device driver model
[WATCHDOG] use mutex instead of semaphore in Berkshire USB-PC Watchdog driver
[WATCHDOG] the scheduled removal of the i8xx_tco watchdog driver
[WATCHDOG] Semi-typical watchdog bug re early misc_register()
[WATCHDOG] add support for the w83627thf chipset.
Diffstat (limited to 'drivers/char/watchdog/machzwd.c')
-rw-r--r-- | drivers/char/watchdog/machzwd.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/char/watchdog/machzwd.c b/drivers/char/watchdog/machzwd.c index 76c7fa37fa6..a0d27160c80 100644 --- a/drivers/char/watchdog/machzwd.c +++ b/drivers/char/watchdog/machzwd.c @@ -440,13 +440,6 @@ static int __init zf_init(void) spin_lock_init(&zf_lock); spin_lock_init(&zf_port_lock); - ret = misc_register(&zf_miscdev); - if (ret){ - printk(KERN_ERR "can't misc_register on minor=%d\n", - WATCHDOG_MINOR); - goto out; - } - if(!request_region(ZF_IOBASE, 3, "MachZ ZFL WDT")){ printk(KERN_ERR "cannot reserve I/O ports at %d\n", ZF_IOBASE); @@ -461,16 +454,23 @@ static int __init zf_init(void) goto no_reboot; } + ret = misc_register(&zf_miscdev); + if (ret){ + printk(KERN_ERR "can't misc_register on minor=%d\n", + WATCHDOG_MINOR); + goto no_misc; + } + zf_set_status(0); zf_set_control(0); return 0; +no_misc: + unregister_reboot_notifier(&zf_notifier); no_reboot: release_region(ZF_IOBASE, 3); no_region: - misc_deregister(&zf_miscdev); -out: return ret; } |