From 6039f269e4fab91848c0c51b1e7d1b4fcecf8add Mon Sep 17 00:00:00 2001 From: Wim Van Sebroeck Date: Sat, 9 Aug 2003 19:50:46 +0200 Subject: [PATCH] [WATCHDOG] sbc60xxwdt.c patch5 some last clean-ups --- drivers/char/watchdog/sbc60xxwdt.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/char/watchdog/sbc60xxwdt.c b/drivers/char/watchdog/sbc60xxwdt.c index 1718162ec4cf1..7d17bed496731 100644 --- a/drivers/char/watchdog/sbc60xxwdt.c +++ b/drivers/char/watchdog/sbc60xxwdt.c @@ -342,6 +342,13 @@ static int __init sbc60xxwdt_init(void) { int rc = -EBUSY; + if(timeout < 1 || timeout > 3600) /* arbitrary upper limit */ + { + timeout = WATCHDOG_TIMEOUT; + printk(KERN_INFO PFX "timeout value must be 1<=x<=3600, using %d\n", + timeout); + } + if (!request_region(wdt_start, 1, "SBC 60XX WDT")) { printk(KERN_ERR PFX "I/O address 0x%04x already in use\n", @@ -361,13 +368,6 @@ static int __init sbc60xxwdt_init(void) } } - if(timeout < 1 || timeout > 3600) /* arbitrary upper limit */ - { - timeout = WATCHDOG_TIMEOUT; - printk(KERN_INFO PFX "timeout value must be 1<=x<=3600, using %d\n", - timeout); - } - init_timer(&timer); timer.function = wdt_timer_ping; timer.data = 0; @@ -388,7 +388,8 @@ static int __init sbc60xxwdt_init(void) goto err_out_miscdev; } - printk(KERN_INFO PFX "WDT driver for 60XX single board computer initialised.\n"); + printk(KERN_INFO PFX "WDT driver for 60XX single board computer initialised. timeout=%d sec (nowayout=%d)\n", + timeout, nowayout); return 0; -- 2.53.0