[WATCHDOG] Stop looking for device as soon as one is found

If no address is given for the W83697HF/HG watchdog IO port, stop looping
through possible locations when a watchdog device has been found.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
This commit is contained in:
Samuel Tardieu 2007-11-04 20:20:23 +01:00 committed by Wim Van Sebroeck
parent bb133450ee
commit 3ff6eb4a2f
1 changed files with 3 additions and 1 deletions

View File

@ -382,8 +382,10 @@ wdt_init(void)
/* we will autodetect the W83697HF/HG watchdog */ /* we will autodetect the W83697HF/HG watchdog */
for (i = 0; ((!found) && (w83697hf_ioports[i] != 0)); i++) { for (i = 0; ((!found) && (w83697hf_ioports[i] != 0)); i++) {
wdt_io = w83697hf_ioports[i]; wdt_io = w83697hf_ioports[i];
if (!w83697hf_check_wdt()) if (!w83697hf_check_wdt()) {
found++; found++;
break;
}
} }
} else { } else {
if (!w83697hf_check_wdt()) if (!w83697hf_check_wdt())