From d4ea4308b6474c744488f9af0ab37cc1838d7306 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Wed, 28 May 2008 08:27:00 -0300 Subject: [PATCH] --- yaml --- r: 103805 b: refs/heads/master c: b2de2313f170c3f7341d3a94365c5139a23067a7 h: refs/heads/master i: 103803: 7002848287bb7026c0c3bcd7edb39a47f4945686 v: v3 --- [refs] | 2 +- trunk/drivers/media/video/videodev.c | 12 ++++++++---- trunk/include/media/v4l2-dev.h | 3 ++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 630512a42c8b..5d1cae798070 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7bb846afceafdaceb88d2ed2e861585d26e353b9 +refs/heads/master: b2de2313f170c3f7341d3a94365c5139a23067a7 diff --git a/trunk/drivers/media/video/videodev.c b/trunk/drivers/media/video/videodev.c index 91fd6cbc60ca..4d58b55095d7 100644 --- a/trunk/drivers/media/video/videodev.c +++ b/trunk/drivers/media/video/videodev.c @@ -1206,11 +1206,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: diff --git a/trunk/include/media/v4l2-dev.h b/trunk/include/media/v4l2-dev.h index 53b651ac685a..8a40f481d899 100644 --- a/trunk/include/media/v4l2-dev.h +++ b/trunk/include/media/v4l2-dev.h @@ -212,8 +212,9 @@ struct video_device int (*vidioc_streamoff)(struct file *file, void *fh, enum v4l2_buf_type i); /* Standard handling - G_STD and ENUMSTD are handled by videodev.c + ENUMSTD is handled by videodev.c */ + int (*vidioc_g_std) (struct file *file, void *fh, v4l2_std_id *norm); int (*vidioc_s_std) (struct file *file, void *fh, v4l2_std_id *norm); int (*vidioc_querystd) (struct file *file, void *fh, v4l2_std_id *a);