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/cx88/cx88-blackbird.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/cx88/cx88-blackbird.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-blackbird.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c index e162a70748c5..7f5b8bfd08ac 100644 --- a/drivers/media/video/cx88/cx88-blackbird.c +++ b/drivers/media/video/cx88/cx88-blackbird.c | |||
@@ -1049,16 +1049,16 @@ static int vidioc_s_std (struct file *file, void *priv, v4l2_std_id *id) | |||
1049 | 1049 | ||
1050 | /* FIXME: cx88_ioctl_hook not implemented */ | 1050 | /* FIXME: cx88_ioctl_hook not implemented */ |
1051 | 1051 | ||
1052 | static int mpeg_open(struct inode *inode, struct file *file) | 1052 | static int mpeg_open(struct file *file) |
1053 | { | 1053 | { |
1054 | int minor = iminor(inode); | 1054 | int minor = video_devdata(file)->minor; |
1055 | struct cx8802_dev *dev = NULL; | 1055 | struct cx8802_dev *dev = NULL; |
1056 | struct cx8802_fh *fh; | 1056 | struct cx8802_fh *fh; |
1057 | struct cx8802_driver *drv = NULL; | 1057 | struct cx8802_driver *drv = NULL; |
1058 | int err; | 1058 | int err; |
1059 | 1059 | ||
1060 | lock_kernel(); | 1060 | lock_kernel(); |
1061 | dev = cx8802_get_device(inode); | 1061 | dev = cx8802_get_device(minor); |
1062 | 1062 | ||
1063 | dprintk( 1, "%s\n", __func__); | 1063 | dprintk( 1, "%s\n", __func__); |
1064 | 1064 | ||
@@ -1114,7 +1114,7 @@ static int mpeg_open(struct inode *inode, struct file *file) | |||
1114 | return 0; | 1114 | return 0; |
1115 | } | 1115 | } |
1116 | 1116 | ||
1117 | static int mpeg_release(struct inode *inode, struct file *file) | 1117 | static int mpeg_release(struct file *file) |
1118 | { | 1118 | { |
1119 | struct cx8802_fh *fh = file->private_data; | 1119 | struct cx8802_fh *fh = file->private_data; |
1120 | struct cx8802_dev *dev = fh->dev; | 1120 | struct cx8802_dev *dev = fh->dev; |
@@ -1132,7 +1132,7 @@ static int mpeg_release(struct inode *inode, struct file *file) | |||
1132 | kfree(fh); | 1132 | kfree(fh); |
1133 | 1133 | ||
1134 | /* Make sure we release the hardware */ | 1134 | /* Make sure we release the hardware */ |
1135 | dev = cx8802_get_device(inode); | 1135 | dev = cx8802_get_device(video_devdata(file)->minor); |
1136 | if (dev == NULL) | 1136 | if (dev == NULL) |
1137 | return -ENODEV; | 1137 | return -ENODEV; |
1138 | 1138 | ||
@@ -1178,7 +1178,7 @@ mpeg_mmap(struct file *file, struct vm_area_struct * vma) | |||
1178 | return videobuf_mmap_mapper(&fh->mpegq, vma); | 1178 | return videobuf_mmap_mapper(&fh->mpegq, vma); |
1179 | } | 1179 | } |
1180 | 1180 | ||
1181 | static const struct file_operations mpeg_fops = | 1181 | static const struct v4l2_file_operations mpeg_fops = |
1182 | { | 1182 | { |
1183 | .owner = THIS_MODULE, | 1183 | .owner = THIS_MODULE, |
1184 | .open = mpeg_open, | 1184 | .open = mpeg_open, |
@@ -1187,7 +1187,6 @@ static const struct file_operations mpeg_fops = | |||
1187 | .poll = mpeg_poll, | 1187 | .poll = mpeg_poll, |
1188 | .mmap = mpeg_mmap, | 1188 | .mmap = mpeg_mmap, |
1189 | .ioctl = video_ioctl2, | 1189 | .ioctl = video_ioctl2, |
1190 | .llseek = no_llseek, | ||
1191 | }; | 1190 | }; |
1192 | 1191 | ||
1193 | static const struct v4l2_ioctl_ops mpeg_ioctl_ops = { | 1192 | static const struct v4l2_ioctl_ops mpeg_ioctl_ops = { |