V4L/DVB (6713): ivtv: ivtv_yuv_prep_frame breakup and yuv hardware buffer changes
[safe/jmp/linux-2.6] / kernel / time / clockevents.c
index 41dd310..5fb139f 100644 (file)
@@ -78,6 +78,11 @@ int clockevents_program_event(struct clock_event_device *dev, ktime_t expires,
        unsigned long long clc;
        int64_t delta;
 
+       if (unlikely(expires.tv64 < 0)) {
+               WARN_ON_ONCE(1);
+               return -ETIME;
+       }
+
        delta = ktime_to_ns(ktime_sub(expires, now));
 
        if (delta <= 0)
@@ -194,6 +199,7 @@ void clockevents_exchange_device(struct clock_event_device *old,
        local_irq_restore(flags);
 }
 
+#ifdef CONFIG_GENERIC_CLOCKEVENTS
 /**
  * clockevents_notify - notification about relevant events
  */
@@ -222,4 +228,4 @@ void clockevents_notify(unsigned long reason, void *arg)
        spin_unlock(&clockevents_lock);
 }
 EXPORT_SYMBOL_GPL(clockevents_notify);
-
+#endif