From f170053436b8f5d330f29553f4a9e920d6f98ffc Mon Sep 17 00:00:00 2001 From: Wim Van Sebroeck Date: Sat, 9 Aug 2003 19:44:14 +0200 Subject: [PATCH] [WATCHDOG] sbc60xxwdt patch4 added extra printk's to report what problem occured --- drivers/char/watchdog/sbc60xxwdt.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/char/watchdog/sbc60xxwdt.c b/drivers/char/watchdog/sbc60xxwdt.c index 469608565cb08..1718162ec4cf1 100644 --- a/drivers/char/watchdog/sbc60xxwdt.c +++ b/drivers/char/watchdog/sbc60xxwdt.c @@ -343,19 +343,28 @@ static int __init sbc60xxwdt_init(void) int rc = -EBUSY; if (!request_region(wdt_start, 1, "SBC 60XX WDT")) + { + printk(KERN_ERR PFX "I/O address 0x%04x already in use\n", + wdt_start); + rc = -EIO; goto err_out; + } /* We cannot reserve 0x45 - the kernel already has! */ if ((wdt_stop != 0x45) && (wdt_stop != wdt_start)) { if (!request_region(wdt_stop, 1, "SBC 60XX WDT")) + { + printk(KERN_ERR PFX "I/O address 0x%04x already in use\n", + wdt_stop); goto err_out_region1; + } } 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", + printk(KERN_INFO PFX "timeout value must be 1<=x<=3600, using %d\n", timeout); } @@ -365,11 +374,19 @@ static int __init sbc60xxwdt_init(void) rc = misc_register(&wdt_miscdev); if (rc) + { + printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", + wdt_miscdev.minor, rc); goto err_out_region2; + } rc = register_reboot_notifier(&wdt_notifier); if (rc) + { + printk(KERN_ERR PFX "cannot register reboot notifier (err=%d)\n", + rc); goto err_out_miscdev; + } printk(KERN_INFO PFX "WDT driver for 60XX single board computer initialised.\n"); -- 2.53.0