diff options
-rw-r--r-- | drivers/media/video/videodev.c | 12 | ||||
-rw-r--r-- | include/media/v4l2-dev.h | 3 |
2 files changed, 10 insertions, 5 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: |
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index 53b651ac685a..8a40f481d899 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
@@ -212,8 +212,9 @@ struct video_device | |||
212 | int (*vidioc_streamoff)(struct file *file, void *fh, enum v4l2_buf_type i); | 212 | int (*vidioc_streamoff)(struct file *file, void *fh, enum v4l2_buf_type i); |
213 | 213 | ||
214 | /* Standard handling | 214 | /* Standard handling |
215 | G_STD and ENUMSTD are handled by videodev.c | 215 | ENUMSTD is handled by videodev.c |
216 | */ | 216 | */ |
217 | int (*vidioc_g_std) (struct file *file, void *fh, v4l2_std_id *norm); | ||
217 | int (*vidioc_s_std) (struct file *file, void *fh, v4l2_std_id *norm); | 218 | int (*vidioc_s_std) (struct file *file, void *fh, v4l2_std_id *norm); |
218 | int (*vidioc_querystd) (struct file *file, void *fh, v4l2_std_id *a); | 219 | int (*vidioc_querystd) (struct file *file, void *fh, v4l2_std_id *a); |
219 | 220 | ||