aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx23885/cx23885-417.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-12-30 04:58:20 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-01-02 14:11:12 -0500
commitbec43661b1dc0075b7445223ba775674133b164d (patch)
tree2a09ad5cc78799985e5cfb789f0a23db58e70499 /drivers/media/video/cx23885/cx23885-417.c
parentdfa9a5ae679ff2d23caa995d0f55a19abaf0596e (diff)
V4L/DVB (10135): v4l2: introduce v4l2_file_operations.
Introduce a struct v4l2_file_operations for v4l2 drivers. Remove the unnecessary inode argument. Move compat32 handling (and llseek) into the v4l2-dev core: this is now handled in the v4l2 core and no longer in the drivers themselves. Note that this changeset reverts an earlier patch that changed the return type of__video_ioctl2 from int to long. This change will be reinstated later in a much improved version. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-417.c')
-rw-r--r--drivers/media/video/cx23885/cx23885-417.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/media/video/cx23885/cx23885-417.c b/drivers/media/video/cx23885/cx23885-417.c
index 798d24024353..d9888136255d 100644
--- a/drivers/media/video/cx23885/cx23885-417.c
+++ b/drivers/media/video/cx23885/cx23885-417.c
@@ -1573,9 +1573,9 @@ static int vidioc_queryctrl(struct file *file, void *priv,
1573 return cx23885_queryctrl(dev, c); 1573 return cx23885_queryctrl(dev, c);
1574} 1574}
1575 1575
1576static int mpeg_open(struct inode *inode, struct file *file) 1576static int mpeg_open(struct file *file)
1577{ 1577{
1578 int minor = iminor(inode); 1578 int minor = video_devdata(file)->minor;
1579 struct cx23885_dev *h, *dev = NULL; 1579 struct cx23885_dev *h, *dev = NULL;
1580 struct list_head *list; 1580 struct list_head *list;
1581 struct cx23885_fh *fh; 1581 struct cx23885_fh *fh;
@@ -1617,7 +1617,7 @@ static int mpeg_open(struct inode *inode, struct file *file)
1617 return 0; 1617 return 0;
1618} 1618}
1619 1619
1620static int mpeg_release(struct inode *inode, struct file *file) 1620static int mpeg_release(struct file *file)
1621{ 1621{
1622 struct cx23885_fh *fh = file->private_data; 1622 struct cx23885_fh *fh = file->private_data;
1623 struct cx23885_dev *dev = fh->dev; 1623 struct cx23885_dev *dev = fh->dev;
@@ -1694,15 +1694,13 @@ static int mpeg_mmap(struct file *file, struct vm_area_struct *vma)
1694 return videobuf_mmap_mapper(&fh->mpegq, vma); 1694 return videobuf_mmap_mapper(&fh->mpegq, vma);
1695} 1695}
1696 1696
1697static struct file_operations mpeg_fops = { 1697static struct v4l2_file_operations mpeg_fops = {
1698 .owner = THIS_MODULE, 1698 .owner = THIS_MODULE,
1699 .open = mpeg_open, 1699 .open = mpeg_open,
1700 .release = mpeg_release, 1700 .release = mpeg_release,
1701 .read = mpeg_read, 1701 .read = mpeg_read,
1702 .poll = mpeg_poll, 1702 .poll = mpeg_poll,
1703 .mmap = mpeg_mmap, 1703 .mmap = mpeg_mmap,
1704 .ioctl = video_ioctl2,
1705 .llseek = no_llseek,
1706}; 1704};
1707 1705
1708static const struct v4l2_ioctl_ops mpeg_ioctl_ops = { 1706static const struct v4l2_ioctl_ops mpeg_ioctl_ops = {