tick: Ensure that the broadcast device is initialized
[linux-flexiantxendom0-3.2.10.git] / kernel / time / tick-broadcast.c
index 119aca5..029531f 100644 (file)
@@ -373,6 +373,9 @@ static int tick_broadcast_set_event(ktime_t expires, int force)
 {
        struct clock_event_device *bc = tick_broadcast_device.evtdev;
 
+       if (bc->mode != CLOCK_EVT_MODE_ONESHOT)
+               clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
+
        return clockevents_program_event(bc, expires, force);
 }