summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-05-28 10:27:00 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2008-05-28 10:27:00 +0200
commitdb9c8e1db5a3ac5b6012c4371bcf3b1a00190d0e (patch)
treed0d8d1a87c01bd9cd095fa8c4cd3560af93d187f /linux/drivers/media
parent4c4ffaaff72aa78fdd1b96d73fe1eb265b5f2d07 (diff)
downloadmediapointer-dvb-s2-db9c8e1db5a3ac5b6012c4371bcf3b1a00190d0e.tar.gz
mediapointer-dvb-s2-db9c8e1db5a3ac5b6012c4371bcf3b1a00190d0e.tar.bz2
videodev: add vidioc_g_std callback.
From: Hans Verkuil <hverkuil@xs4all.nl> The default videodev behavior for VIDIOC_G_STD is not correct for all devices. Add a new callback that drivers can use instead. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/video/videodev.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/linux/drivers/media/video/videodev.c b/linux/drivers/media/video/videodev.c
index b2291e085..4f04a1260 100644
--- a/linux/drivers/media/video/videodev.c
+++ b/linux/drivers/media/video/videodev.c
@@ -1348,11 +1348,15 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
{
v4l2_std_id *id = arg;
- *id = vfd->current_norm;
-
- dbgarg (cmd, "value=%08Lx\n", (long long unsigned) *id);
+ ret = 0;
+ /* Calls the specific handler */
+ if (vfd->vidioc_g_std)
+ ret = vfd->vidioc_g_std(file, fh, id);
+ else
+ *id = vfd->current_norm;
- ret=0;
+ if (!ret)
+ dbgarg(cmd, "value=%08Lx\n", (long long unsigned)*id);
break;
}
case VIDIOC_S_STD: