Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40243
b: refs/heads/master
c: e223f01
h: refs/heads/master
i:
  40241: 7932234
  40239: 3fa5a29
v: v3
  • Loading branch information
Wim Van Sebroeck committed Oct 4, 2006
1 parent 022a072 commit e8abaa2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3fdee8db010d5cbf890ec49332ac4946f3f63720
refs/heads/master: e223f01a822e999b0aea2e720e12d8bb3532da70
32 changes: 17 additions & 15 deletions trunk/drivers/char/watchdog/w83697hf_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,33 +369,35 @@ w83697hf_check_wdt(void)
return -EIO;
}

static int w83697hf_ioports[] = { 0x2e, 0x4e, 0x00 };

static int __init
wdt_init(void)
{
int ret, autodetect;
int ret, i, found = 0;

spin_lock_init(&io_lock);

printk (KERN_INFO PFX "WDT driver for W83697HF/HG initializing\n");

autodetect = wdt_io == 0;
if (autodetect)
wdt_io = 0x2e;

if (!w83697hf_check_wdt())
goto found;

if (autodetect) {
wdt_io = 0x4e;
if (wdt_io == 0) {
/* we will autodetect the W83697HF/HG watchdog */
for (i = 0; ((!found) && (w83697hf_ioports[i] != 0)); i++) {
wdt_io = w83697hf_ioports[i];
if (!w83697hf_check_wdt())
found++;
}
} else {
if (!w83697hf_check_wdt())
goto found;
found++;
}

printk (KERN_ERR PFX "No W83697HF/HG could be found\n");
ret = -EIO;
goto out;
if (!found) {
printk (KERN_ERR PFX "No W83697HF/HG could be found\n");
ret = -EIO;
goto out;
}

found:
w83697hf_init();
wdt_disable(); /* Disable watchdog until first use */

Expand Down

0 comments on commit e8abaa2

Please sign in to comment.