/* Waits for an event to occur which completes our  */
static void vt_event_wait(struct vt_event_wait *vw)
/* Waits for an event to occur which completes our  */
static void vt_event_wait(struct vt_event_wait *vw)
{
	unsigned long flags;
	INIT_LIST_HEAD(&vw->list);
	vw->done = 0;
	spin_lock_irqsave(&vt_event_lock, flags);
	list_add(&vw->list, &vt_events);
	spin_unlock_irqrestore(&vt_event_lock, flags);
	wait_event_interruptible(vt_event_waitqueue, vw->done);
	spin_lock_irqsave(&vt_event_lock, flags);
	list_del(&vw->list);
	spin_unlock_irqrestore(&vt_event_lock, flags);
}