]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/time/tick-oneshot.c
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
[linux-2.6-omap-h63xx.git] / kernel / time / tick-oneshot.c
index f6997ab0c3c9c1101c9df8c9bd433e4126cc4a40..450c04935b66b050e35671d821c5f190b394414f 100644 (file)
@@ -14,7 +14,7 @@
 #include <linux/cpu.h>
 #include <linux/err.h>
 #include <linux/hrtimer.h>
-#include <linux/irq.h>
+#include <linux/interrupt.h>
 #include <linux/percpu.h>
 #include <linux/profile.h>
 #include <linux/sched.h>
@@ -73,8 +73,21 @@ int tick_switch_to_oneshot(void (*handler)(struct clock_event_device *))
        struct clock_event_device *dev = td->evtdev;
 
        if (!dev || !(dev->features & CLOCK_EVT_FEAT_ONESHOT) ||
-           !tick_device_is_functional(dev))
+                   !tick_device_is_functional(dev)) {
+
+               printk(KERN_INFO "Clockevents: "
+                      "could not switch to one-shot mode:");
+               if (!dev) {
+                       printk(" no tick device\n");
+               } else {
+                       if (!tick_device_is_functional(dev))
+                               printk(" %s is not functional.\n", dev->name);
+                       else
+                               printk(" %s does not support one-shot mode.\n",
+                                      dev->name);
+               }
                return -EINVAL;
+       }
 
        td->mode = TICKDEV_MODE_ONESHOT;
        dev->event_handler = handler;