From: Samuel Tardieu Date: Sun, 4 Nov 2007 19:20:23 +0000 (+0100) Subject: [WATCHDOG] Stop looking for device as soon as one is found X-Git-Tag: v2.6.24-rc6~63^2~5 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=3ff6eb4a2fe5757cbe7c5d57c8eb60ab0775f2f0;p=linux-2.6-omap-h63xx.git [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 Signed-off-by: Wim Van Sebroeck --- diff --git a/drivers/watchdog/w83697hf_wdt.c b/drivers/watchdog/w83697hf_wdt.c index c622a0e6c9a..6ea125eabea 100644 --- a/drivers/watchdog/w83697hf_wdt.c +++ b/drivers/watchdog/w83697hf_wdt.c @@ -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())