From bedd8eeeadbb42ce9a669b8e69d8474364786ffc Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 19 Aug 2013 21:52:07 +1000 Subject: [PATCH] Revert "Sleep for half a work period only in bflsc_get_results if no dev is suitable." This reverts commit 974319454795979dad013c705ca9d53aae67668d. Fine now that sleep works properly with the longer sleep. --- driver-bflsc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/driver-bflsc.c b/driver-bflsc.c index 06f7819a..20725b51 100644 --- a/driver-bflsc.c +++ b/driver-bflsc.c @@ -1424,12 +1424,8 @@ static void *bflsc_get_results(void *userdata) return NULL; cgsleep_prepare_r(&ts_start); - if (dev == -1) { - /* Sleep for only half a work period before checking - * again. */ - cgsleep_ms_r(&ts_start, sc_info->default_ms_work / 2); - continue; - } + if (dev == -1) + goto utsura; cgtime(&(sc_info->sc_devs[dev].last_check_result)); @@ -1446,6 +1442,8 @@ static void *bflsc_get_results(void *userdata) // TODO: if not getting results ... reinit? } + +utsura: cgsleep_ms_r(&ts_start, sc_info->results_sleep_time); }