]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/time/clockevents.c
Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6
[linux-2.6-omap-h63xx.git] / kernel / time / clockevents.c
index 41dd3105ce7fd6846aabecb2f3d1b31410994bc4..5fb139fef9fa78821e0f85d640d211b1fbb0f5c7 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