]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
[WATCHDOG] Stop looking for device as soon as one is found
authorSamuel Tardieu <sam@rfc1149.net>
Sun, 4 Nov 2007 19:20:23 +0000 (20:20 +0100)
committerWim Van Sebroeck <wim@iguana.be>
Mon, 19 Nov 2007 21:09:16 +0000 (21:09 +0000)
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>
drivers/watchdog/w83697hf_wdt.c

index c622a0e6c9aed57137b59ab0d1af4aabffefe1dc..6ea125eabeaab3777dfc78f683d8eed9d0d9f5e7 100644 (file)
@@ -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())