strcpy(cap->driver, "saa7134"); 
strcpy(cap->driver, "saa7134"); 
static int ts_do_ioctl(struct inode *inode, struct file *file,		       unsigned int cmd, void *arg){	struct saa7134_dev *dev = file->private_data;	if (debug > 1)		saa7134_print_ioctl(dev->name,cmd);	switch (cmd) {	case VIDIOC_QUERYCAP:	{		struct v4l2_capability *cap = arg;		memset(cap,0,sizeof(*cap));                strcpy(cap->driver, "saa7134");		strlcpy(cap->card, saa7134_boards[dev->board].name,			sizeof(cap->card));		sprintf(cap->bus_info,"PCI:%s",pci_name(dev->pci));		cap->version = SAA7134_VERSION_CODE;		cap->capabilities =			V4L2_CAP_VIDEO_CAPTURE |			V4L2_CAP_READWRITE |			V4L2_CAP_STREAMING;		return 0;	}	/* --- input switching --------------------------------------- */	case VIDIOC_ENUMINPUT:	{		struct v4l2_input *i = arg;		if (i->index != 0)			return -EINVAL;		i->type = V4L2_INPUT_TYPE_CAMERA;		strcpy(i->name,"CCIR656");		return 0;	}	case VIDIOC_G_INPUT:	{		int *i = arg;		*i = 0;		return 0;	}	case VIDIOC_S_INPUT:	{		int *i = arg;		if (*i != 0)			return -EINVAL;		return 0;	}	/* --- capture ioctls ---------------------------------------- */	case VIDIOC_ENUM_FMT:	{		struct v4l2_fmtdesc *f = arg;		int index;		index = f->index;		if (index != 0)			return -EINVAL;		memset(f,0,sizeof(*f));		f->index = index;		strlcpy(f->description, "MPEG TS", sizeof(f->description));		f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;		f->pixelformat = V4L2_PIX_FMT_MPEG;		return 0;	}	case VIDIOC_G_FMT:	{		struct v4l2_format *f = arg;		memset(f,0,sizeof(*f));		f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;		saa7134_i2c_call_clients(dev, cmd, arg);		f->fmt.pix.pixelformat  = V4L2_PIX_FMT_MPEG;		f->fmt.pix.sizeimage    = TS_PACKET_SIZE * dev->ts.nr_packets;		return 0;	}	case VIDIOC_S_FMT:	{		struct v4l2_format *f = arg;		if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)		    return -EINVAL;		saa7134_i2c_call_clients(dev, cmd, arg);		f->fmt.pix.pixelformat  = V4L2_PIX_FMT_MPEG;		f->fmt.pix.sizeimage    = TS_PACKET_SIZE* dev->ts.nr_packets;		return 0;	}	case VIDIOC_REQBUFS:		return videobuf_reqbufs(&dev->empress_tsq,arg);	case VIDIOC_QUERYBUF:		return videobuf_querybuf(&dev->empress_tsq,arg);	case VIDIOC_QBUF:		return videobuf_qbuf(&dev->empress_tsq,arg);	case VIDIOC_DQBUF:		return videobuf_dqbuf(&dev->empress_tsq,arg,				      file->f_flags & O_NONBLOCK);	case VIDIOC_STREAMON:		return videobuf_streamon(&dev->empress_tsq);	case VIDIOC_STREAMOFF:		return videobuf_streamoff(&dev->empress_tsq);	case VIDIOC_QUERYCTRL:	case VIDIOC_G_CTRL:	case VIDIOC_S_CTRL:		return saa7134_common_ioctl(dev, cmd, arg);	case VIDIOC_S_MPEGCOMP:		saa7134_i2c_call_clients(dev, VIDIOC_S_MPEGCOMP, arg);		ts_init_encoder(dev);		return 0;	case VIDIOC_G_MPEGCOMP:		saa7134_i2c_call_clients(dev, VIDIOC_G_MPEGCOMP, arg);		return 0;	default:		return -ENOIOCTLCMD;	}	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/4ac97914c6c35f6bf132071c718e034d0846b9f5/saa7134-empress.c/clean/drivers/media/video/saa7134/saa7134-empress.c