diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-12-30 04:58:20 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-01-02 14:11:12 -0500 |
commit | bec43661b1dc0075b7445223ba775674133b164d (patch) | |
tree | 2a09ad5cc78799985e5cfb789f0a23db58e70499 /drivers/media/video/vivi.c | |
parent | dfa9a5ae679ff2d23caa995d0f55a19abaf0596e (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/vivi.c')
-rw-r--r-- | drivers/media/video/vivi.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c index e15e48f04be7..81d5aa5cf331 100644 --- a/drivers/media/video/vivi.c +++ b/drivers/media/video/vivi.c | |||
@@ -1024,9 +1024,9 @@ static int vidioc_s_ctrl(struct file *file, void *priv, | |||
1024 | File operations for the device | 1024 | File operations for the device |
1025 | ------------------------------------------------------------------*/ | 1025 | ------------------------------------------------------------------*/ |
1026 | 1026 | ||
1027 | static int vivi_open(struct inode *inode, struct file *file) | 1027 | static int vivi_open(struct file *file) |
1028 | { | 1028 | { |
1029 | int minor = iminor(inode); | 1029 | int minor = video_devdata(file)->minor; |
1030 | struct vivi_dev *dev; | 1030 | struct vivi_dev *dev; |
1031 | struct vivi_fh *fh = NULL; | 1031 | struct vivi_fh *fh = NULL; |
1032 | int i; | 1032 | int i; |
@@ -1127,13 +1127,13 @@ vivi_poll(struct file *file, struct poll_table_struct *wait) | |||
1127 | return videobuf_poll_stream(file, q, wait); | 1127 | return videobuf_poll_stream(file, q, wait); |
1128 | } | 1128 | } |
1129 | 1129 | ||
1130 | static int vivi_close(struct inode *inode, struct file *file) | 1130 | static int vivi_close(struct file *file) |
1131 | { | 1131 | { |
1132 | struct vivi_fh *fh = file->private_data; | 1132 | struct vivi_fh *fh = file->private_data; |
1133 | struct vivi_dev *dev = fh->dev; | 1133 | struct vivi_dev *dev = fh->dev; |
1134 | struct vivi_dmaqueue *vidq = &dev->vidq; | 1134 | struct vivi_dmaqueue *vidq = &dev->vidq; |
1135 | 1135 | ||
1136 | int minor = iminor(inode); | 1136 | int minor = video_devdata(file)->minor; |
1137 | 1137 | ||
1138 | vivi_stop_thread(vidq); | 1138 | vivi_stop_thread(vidq); |
1139 | videobuf_stop(&fh->vb_vidq); | 1139 | videobuf_stop(&fh->vb_vidq); |
@@ -1195,16 +1195,14 @@ static int vivi_mmap(struct file *file, struct vm_area_struct *vma) | |||
1195 | return ret; | 1195 | return ret; |
1196 | } | 1196 | } |
1197 | 1197 | ||
1198 | static const struct file_operations vivi_fops = { | 1198 | static const struct v4l2_file_operations vivi_fops = { |
1199 | .owner = THIS_MODULE, | 1199 | .owner = THIS_MODULE, |
1200 | .open = vivi_open, | 1200 | .open = vivi_open, |
1201 | .release = vivi_close, | 1201 | .release = vivi_close, |
1202 | .read = vivi_read, | 1202 | .read = vivi_read, |
1203 | .poll = vivi_poll, | 1203 | .poll = vivi_poll, |
1204 | .ioctl = video_ioctl2, /* V4L2 ioctl handler */ | 1204 | .ioctl = video_ioctl2, /* V4L2 ioctl handler */ |
1205 | .compat_ioctl = v4l_compat_ioctl32, | ||
1206 | .mmap = vivi_mmap, | 1205 | .mmap = vivi_mmap, |
1207 | .llseek = no_llseek, | ||
1208 | }; | 1206 | }; |
1209 | 1207 | ||
1210 | static const struct v4l2_ioctl_ops vivi_ioctl_ops = { | 1208 | static const struct v4l2_ioctl_ops vivi_ioctl_ops = { |