make queue_delayed_work() friendly to flush_fork()
[powerpc.git] / kernel / time / clocksource.c
index 5b0e46b..db0c725 100644 (file)
@@ -75,14 +75,14 @@ static struct timer_list watchdog_timer;
 static DEFINE_SPINLOCK(watchdog_lock);
 static cycle_t watchdog_last;
 /*
- * Interval: 0.5sec Treshold: 0.0625s
+ * Interval: 0.5sec Threshold: 0.0625s
  */
 #define WATCHDOG_INTERVAL (HZ >> 1)
-#define WATCHDOG_TRESHOLD (NSEC_PER_SEC >> 4)
+#define WATCHDOG_THRESHOLD (NSEC_PER_SEC >> 4)
 
 static void clocksource_ratewd(struct clocksource *cs, int64_t delta)
 {
-       if (delta > -WATCHDOG_TRESHOLD && delta < WATCHDOG_TRESHOLD)
+       if (delta > -WATCHDOG_THRESHOLD && delta < WATCHDOG_THRESHOLD)
                return;
 
        printk(KERN_WARNING "Clocksource %s unstable (delta = %Ld ns)\n",
@@ -151,7 +151,8 @@ static void clocksource_check_watchdog(struct clocksource *cs)
                        watchdog_timer.expires = jiffies + WATCHDOG_INTERVAL;
                        add_timer(&watchdog_timer);
                }
-       } else if (cs->flags & CLOCK_SOURCE_IS_CONTINUOUS) {
+       } else {
+               if (cs->flags & CLOCK_SOURCE_IS_CONTINUOUS)
                        cs->flags |= CLOCK_SOURCE_VALID_FOR_HRES;
 
                if (!watchdog || cs->rating > watchdog->rating) {