aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/arch-v10/kernel/fasttimer.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/cris/arch-v10/kernel/fasttimer.c')
-rw-r--r--arch/cris/arch-v10/kernel/fasttimer.c35
1 files changed, 14 insertions, 21 deletions
diff --git a/arch/cris/arch-v10/kernel/fasttimer.c b/arch/cris/arch-v10/kernel/fasttimer.c
index c1a3a2100ee7..31ff35cff02c 100644
--- a/arch/cris/arch-v10/kernel/fasttimer.c
+++ b/arch/cris/arch-v10/kernel/fasttimer.c
@@ -31,15 +31,12 @@
31 31
32#define DEBUG_LOG_INCLUDED 32#define DEBUG_LOG_INCLUDED
33#define FAST_TIMER_LOG 33#define FAST_TIMER_LOG
34//#define FAST_TIMER_TEST 34/* #define FAST_TIMER_TEST */
35 35
36#define FAST_TIMER_SANITY_CHECKS 36#define FAST_TIMER_SANITY_CHECKS
37 37
38#ifdef FAST_TIMER_SANITY_CHECKS 38#ifdef FAST_TIMER_SANITY_CHECKS
39#define SANITYCHECK(x) x
40static int sanity_failed; 39static int sanity_failed;
41#else
42#define SANITYCHECK(x)
43#endif 40#endif
44 41
45#define D1(x) 42#define D1(x)
@@ -226,23 +223,19 @@ void start_one_shot_timer(struct fast_timer *t,
226 do_gettimeofday_fast(&t->tv_set); 223 do_gettimeofday_fast(&t->tv_set);
227 tmp = fast_timer_list; 224 tmp = fast_timer_list;
228 225
229 SANITYCHECK({ /* Check so this is not in the list already... */ 226#ifdef FAST_TIMER_SANITY_CHECKS
230 while (tmp != NULL) 227 /* Check so this is not in the list already... */
231 { 228 while (tmp != NULL) {
232 if (tmp == t) 229 if (tmp == t) {
233 { 230 printk(KERN_WARNING "timer name: %s data: "
234 printk(KERN_WARNING 231 "0x%08lX already in list!\n", name, data);
235 "timer name: %s data: 0x%08lX already in list!\n", name, data); 232 sanity_failed++;
236 sanity_failed++; 233 goto done;
237 goto done; 234 } else
238 } 235 tmp = tmp->next;
239 else 236 }
240 { 237 tmp = fast_timer_list;
241 tmp = tmp->next; 238#endif
242 }
243 }
244 tmp = fast_timer_list;
245 });
246 239
247 t->delay_us = delay_us; 240 t->delay_us = delay_us;
248 t->function = function; 241 t->function = function;