aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134/saa7134-video.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/saa7134/saa7134-video.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/saa7134/saa7134-video.c')
-rw-r--r--drivers/media/video/saa7134/saa7134-video.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c
index 02bb6747a39c..6b2ab57538ee 100644
--- a/drivers/media/video/saa7134/saa7134-video.c
+++ b/drivers/media/video/saa7134/saa7134-video.c
@@ -1326,9 +1326,9 @@ static int saa7134_resource(struct saa7134_fh *fh)
1326 return 0; 1326 return 0;
1327} 1327}
1328 1328
1329static int video_open(struct inode *inode, struct file *file) 1329static int video_open(struct file *file)
1330{ 1330{
1331 int minor = iminor(inode); 1331 int minor = video_devdata(file)->minor;
1332 struct saa7134_dev *dev; 1332 struct saa7134_dev *dev;
1333 struct saa7134_fh *fh; 1333 struct saa7134_fh *fh;
1334 enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; 1334 enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
@@ -1462,7 +1462,7 @@ err:
1462 return POLLERR; 1462 return POLLERR;
1463} 1463}
1464 1464
1465static int video_release(struct inode *inode, struct file *file) 1465static int video_release(struct file *file)
1466{ 1466{
1467 struct saa7134_fh *fh = file->private_data; 1467 struct saa7134_fh *fh = file->private_data;
1468 struct saa7134_dev *dev = fh->dev; 1468 struct saa7134_dev *dev = fh->dev;
@@ -2377,7 +2377,7 @@ static int radio_queryctrl(struct file *file, void *priv,
2377 return 0; 2377 return 0;
2378} 2378}
2379 2379
2380static const struct file_operations video_fops = 2380static const struct v4l2_file_operations video_fops =
2381{ 2381{
2382 .owner = THIS_MODULE, 2382 .owner = THIS_MODULE,
2383 .open = video_open, 2383 .open = video_open,
@@ -2386,8 +2386,6 @@ static const struct file_operations video_fops =
2386 .poll = video_poll, 2386 .poll = video_poll,
2387 .mmap = video_mmap, 2387 .mmap = video_mmap,
2388 .ioctl = video_ioctl2, 2388 .ioctl = video_ioctl2,
2389 .compat_ioctl = v4l_compat_ioctl32,
2390 .llseek = no_llseek,
2391}; 2389};
2392 2390
2393static const struct v4l2_ioctl_ops video_ioctl_ops = { 2391static const struct v4l2_ioctl_ops video_ioctl_ops = {
@@ -2441,13 +2439,11 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = {
2441#endif 2439#endif
2442}; 2440};
2443 2441
2444static const struct file_operations radio_fops = { 2442static const struct v4l2_file_operations radio_fops = {
2445 .owner = THIS_MODULE, 2443 .owner = THIS_MODULE,
2446 .open = video_open, 2444 .open = video_open,
2447 .release = video_release, 2445 .release = video_release,
2448 .ioctl = video_ioctl2, 2446 .ioctl = video_ioctl2,
2449 .compat_ioctl = v4l_compat_ioctl32,
2450 .llseek = no_llseek,
2451}; 2447};
2452 2448
2453static const struct v4l2_ioctl_ops radio_ioctl_ops = { 2449static const struct v4l2_ioctl_ops radio_ioctl_ops = {