INIT_LIST_HEAD(&dev->video_q.queue); 
INIT_LIST_HEAD(&dev->video_q.queue); 
int saa7134_video_init1(struct saa7134_dev *dev){	/* sanitycheck insmod options */	if (gbuffers < 2 || gbuffers > VIDEO_MAX_FRAME)		gbuffers = 2;	if (gbufsize < 0 || gbufsize > gbufsize_max)		gbufsize = gbufsize_max;	gbufsize = (gbufsize + PAGE_SIZE - 1) & PAGE_MASK;	/* put some sensible defaults into the data structures ... */	dev->ctl_bright     = ctrl_by_id(V4L2_CID_BRIGHTNESS)->default_value;	dev->ctl_contrast   = ctrl_by_id(V4L2_CID_CONTRAST)->default_value;	dev->ctl_hue        = ctrl_by_id(V4L2_CID_HUE)->default_value;	dev->ctl_saturation = ctrl_by_id(V4L2_CID_SATURATION)->default_value;	dev->ctl_volume     = ctrl_by_id(V4L2_CID_AUDIO_VOLUME)->default_value;	dev->ctl_mute       = 1; // ctrl_by_id(V4L2_CID_AUDIO_MUTE)->default_value;	dev->ctl_invert     = ctrl_by_id(V4L2_CID_PRIVATE_INVERT)->default_value;	dev->ctl_automute   = ctrl_by_id(V4L2_CID_PRIVATE_AUTOMUTE)->default_value;	if (dev->tda9887_conf && dev->ctl_automute)		dev->tda9887_conf |= TDA9887_AUTOMUTE;	dev->automute       = 0;        INIT_LIST_HEAD(&dev->video_q.queue);	init_timer(&dev->video_q.timeout);	dev->video_q.timeout.function = saa7134_buffer_timeout;	dev->video_q.timeout.data     = (unsigned long)(&dev->video_q);	dev->video_q.dev              = dev;	if (saa7134_boards[dev->board].video_out) {		/* enable video output */		int vo = saa7134_boards[dev->board].video_out;		int video_reg;		unsigned int vid_port_opts = saa7134_boards[dev->board].vid_port_opts;		saa_writeb(SAA7134_VIDEO_PORT_CTRL0, video_out[vo][0]);		video_reg = video_out[vo][1];		if (vid_port_opts & SET_T_CODE_POLARITY_NON_INVERTED)			video_reg &= ~VP_T_CODE_P_INVERTED;		saa_writeb(SAA7134_VIDEO_PORT_CTRL1, video_reg);		saa_writeb(SAA7134_VIDEO_PORT_CTRL2, video_out[vo][2]);		saa_writeb(SAA7134_VIDEO_PORT_CTRL3, video_out[vo][3]);		saa_writeb(SAA7134_VIDEO_PORT_CTRL4, video_out[vo][4]);		video_reg = video_out[vo][5];		if (vid_port_opts & SET_CLOCK_NOT_DELAYED)			video_reg &= ~VP_CLK_CTRL2_DELAYED;		if (vid_port_opts & SET_CLOCK_INVERTED)			video_reg |= VP_CLK_CTRL1_INVERTED;		saa_writeb(SAA7134_VIDEO_PORT_CTRL5, video_reg);		video_reg = video_out[vo][6];		if (vid_port_opts & SET_VSYNC_OFF) {			video_reg &= ~VP_VS_TYPE_MASK;			video_reg |= VP_VS_TYPE_OFF;		}		saa_writeb(SAA7134_VIDEO_PORT_CTRL6, video_reg);		saa_writeb(SAA7134_VIDEO_PORT_CTRL7, video_out[vo][7]);		saa_writeb(SAA7134_VIDEO_PORT_CTRL8, video_out[vo][8]);	}	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/4ac97914c6c35f6bf132071c718e034d0846b9f5/saa7134-video.c/buggy/drivers/media/video/saa7134/saa7134-video.c