diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-10-04 08:53:00 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-10-08 07:01:40 -0400 |
commit | d56ae6fbf33ddeb7ab2ffac896229ca473a7457f (patch) | |
tree | 961c1e012b785df1e5f178686a107964c658c867 /drivers/media/video/em28xx/em28xx-video.c | |
parent | 5d1ed98683abafef595b8e3a237f845b82152606 (diff) |
[media] em28xx: Add VIDIOC_QUERYSTD support
Allow subdevs to return the detected standards
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-video.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-video.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index 61f35c8d66d2..62182e311060 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c | |||
@@ -1156,6 +1156,21 @@ static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *norm) | |||
1156 | return 0; | 1156 | return 0; |
1157 | } | 1157 | } |
1158 | 1158 | ||
1159 | static int vidioc_querystd(struct file *file, void *priv, v4l2_std_id *norm) | ||
1160 | { | ||
1161 | struct em28xx_fh *fh = priv; | ||
1162 | struct em28xx *dev = fh->dev; | ||
1163 | int rc; | ||
1164 | |||
1165 | rc = check_dev(dev); | ||
1166 | if (rc < 0) | ||
1167 | return rc; | ||
1168 | |||
1169 | v4l2_device_call_all(&dev->v4l2_dev, 0, video, querystd, norm); | ||
1170 | |||
1171 | return 0; | ||
1172 | } | ||
1173 | |||
1159 | static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *norm) | 1174 | static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *norm) |
1160 | { | 1175 | { |
1161 | struct em28xx_fh *fh = priv; | 1176 | struct em28xx_fh *fh = priv; |
@@ -2354,6 +2369,7 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = { | |||
2354 | .vidioc_qbuf = vidioc_qbuf, | 2369 | .vidioc_qbuf = vidioc_qbuf, |
2355 | .vidioc_dqbuf = vidioc_dqbuf, | 2370 | .vidioc_dqbuf = vidioc_dqbuf, |
2356 | .vidioc_g_std = vidioc_g_std, | 2371 | .vidioc_g_std = vidioc_g_std, |
2372 | .vidioc_querystd = vidioc_querystd, | ||
2357 | .vidioc_s_std = vidioc_s_std, | 2373 | .vidioc_s_std = vidioc_s_std, |
2358 | .vidioc_g_parm = vidioc_g_parm, | 2374 | .vidioc_g_parm = vidioc_g_parm, |
2359 | .vidioc_s_parm = vidioc_s_parm, | 2375 | .vidioc_s_parm = vidioc_s_parm, |