diff options
Diffstat (limited to 'kernel/time/tick-oneshot.c')
-rw-r--r-- | kernel/time/tick-oneshot.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/kernel/time/tick-oneshot.c b/kernel/time/tick-oneshot.c index f6997ab0c3c9..0258d3115d54 100644 --- a/kernel/time/tick-oneshot.c +++ b/kernel/time/tick-oneshot.c | |||
@@ -73,8 +73,21 @@ int tick_switch_to_oneshot(void (*handler)(struct clock_event_device *)) | |||
73 | struct clock_event_device *dev = td->evtdev; | 73 | struct clock_event_device *dev = td->evtdev; |
74 | 74 | ||
75 | if (!dev || !(dev->features & CLOCK_EVT_FEAT_ONESHOT) || | 75 | if (!dev || !(dev->features & CLOCK_EVT_FEAT_ONESHOT) || |
76 | !tick_device_is_functional(dev)) | 76 | !tick_device_is_functional(dev)) { |
77 | |||
78 | printk(KERN_INFO "Clockevents: " | ||
79 | "could not switch to one-shot mode:"); | ||
80 | if (!dev) { | ||
81 | printk(" no tick device\n"); | ||
82 | } else { | ||
83 | if (!tick_device_is_functional(dev)) | ||
84 | printk(" %s is not functional.\n", dev->name); | ||
85 | else | ||
86 | printk(" %s does not support one-shot mode.\n", | ||
87 | dev->name); | ||
88 | } | ||
77 | return -EINVAL; | 89 | return -EINVAL; |
90 | } | ||
78 | 91 | ||
79 | td->mode = TICKDEV_MODE_ONESHOT; | 92 | td->mode = TICKDEV_MODE_ONESHOT; |
80 | dev->event_handler = handler; | 93 | dev->event_handler = handler; |