diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-05-28 07:27:00 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-20 06:07:22 -0400 |
commit | b2de2313f170c3f7341d3a94365c5139a23067a7 (patch) | |
tree | 6fc5d506b63ce937091d59232c6d5e507c5e0ad2 /drivers | |
parent | 7bb846afceafdaceb88d2ed2e861585d26e353b9 (diff) |
V4L/DVB (7947): videodev: add vidioc_g_std callback.
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/videodev.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c index 91fd6cbc60ca..4d58b55095d7 100644 --- a/drivers/media/video/videodev.c +++ b/drivers/media/video/videodev.c | |||
@@ -1206,11 +1206,15 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, | |||
1206 | { | 1206 | { |
1207 | v4l2_std_id *id = arg; | 1207 | v4l2_std_id *id = arg; |
1208 | 1208 | ||
1209 | *id = vfd->current_norm; | 1209 | ret = 0; |
1210 | 1210 | /* Calls the specific handler */ | |
1211 | dbgarg (cmd, "value=%08Lx\n", (long long unsigned) *id); | 1211 | if (vfd->vidioc_g_std) |
1212 | ret = vfd->vidioc_g_std(file, fh, id); | ||
1213 | else | ||
1214 | *id = vfd->current_norm; | ||
1212 | 1215 | ||
1213 | ret=0; | 1216 | if (!ret) |
1217 | dbgarg(cmd, "value=%08Lx\n", (long long unsigned)*id); | ||
1214 | break; | 1218 | break; |
1215 | } | 1219 | } |
1216 | case VIDIOC_S_STD: | 1220 | case VIDIOC_S_STD: |