Skip to content

Commit

Permalink
[WATCHDOG] Stop looking for device as soon as one is found
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Samuel Tardieu authored and Wim Van Sebroeck committed Nov 19, 2007
1 parent bb13345 commit 3ff6eb4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/watchdog/w83697hf_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,10 @@ wdt_init(void)
/* 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())
if (!w83697hf_check_wdt()) {
found++;
break;
}
}
} else {
if (!w83697hf_check_wdt())
Expand Down

0 comments on commit 3ff6eb4

Please sign in to comment.