wait_queue_t __wait; 
int matroxfb_wait_for_sync(WPMINFO u_int32_t crtc) {	wait_queue_t __wait;	struct matrox_vsync *vs;	unsigned int cnt;	int ret;	switch (crtc) {		case 0:			vs = &ACCESS_FBINFO(crtc1.vsync);			break;		case 1:			if (ACCESS_FBINFO(devflags.accelerator) != FB_ACCEL_MATROX_MGAG400) {				return -ENODEV;			}			vs = &ACCESS_FBINFO(crtc2.vsync);			break;		default:			return -ENODEV;	}	ret = matroxfb_enable_irq(PMINFO 0);	if (ret) {		return ret;	}        init_waitqueue_entry(&__wait, current);	cnt = vs->cnt;	ret = wait_event_interruptible_timeout(vs->wait, cnt != vs->cnt, HZ/10);	if (ret < 0) {		return ret;	}	if (ret == 0) {		matroxfb_enable_irq(PMINFO 1);		return -ETIMEDOUT;	}	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b1e91fdf56930fd3bd11f0df26e686feabf65ebe/matroxfb_base.c/buggy/drivers/video/matrox/matroxfb_base.c