diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-09-04 09:08:01 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-01 13:56:42 -0400 |
commit | 737c097b9aed92906b4bb9f90f05eb4d5696f572 (patch) | |
tree | 70398985fa6e9793659a732974460e651103b905 /drivers/media/v4l2-core | |
parent | f39a0dd62a1a0e674078c3273977bf055a21f80d (diff) |
[media] v4l2-ioctl.c: fix overlay support
The vidioc_overlay op needs an unsigned int, not an unsigned int pointer.
So we need a small function that dereferences the unsigned int pointer.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/v4l2-core')
-rw-r--r-- | drivers/media/v4l2-core/v4l2-ioctl.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 09512ebc6497..9d3e46c446ad 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c | |||
@@ -1422,6 +1422,12 @@ static int v4l_s_hw_freq_seek(const struct v4l2_ioctl_ops *ops, | |||
1422 | return ops->vidioc_s_hw_freq_seek(file, fh, p); | 1422 | return ops->vidioc_s_hw_freq_seek(file, fh, p); |
1423 | } | 1423 | } |
1424 | 1424 | ||
1425 | static int v4l_overlay(const struct v4l2_ioctl_ops *ops, | ||
1426 | struct file *file, void *fh, void *arg) | ||
1427 | { | ||
1428 | return ops->vidioc_overlay(file, fh, *(unsigned int *)arg); | ||
1429 | } | ||
1430 | |||
1425 | static int v4l_reqbufs(const struct v4l2_ioctl_ops *ops, | 1431 | static int v4l_reqbufs(const struct v4l2_ioctl_ops *ops, |
1426 | struct file *file, void *fh, void *arg) | 1432 | struct file *file, void *fh, void *arg) |
1427 | { | 1433 | { |
@@ -1953,7 +1959,7 @@ static struct v4l2_ioctl_info v4l2_ioctls[] = { | |||
1953 | IOCTL_INFO_FNC(VIDIOC_QUERYBUF, v4l_querybuf, v4l_print_buffer, INFO_FL_QUEUE | INFO_FL_CLEAR(v4l2_buffer, length)), | 1959 | IOCTL_INFO_FNC(VIDIOC_QUERYBUF, v4l_querybuf, v4l_print_buffer, INFO_FL_QUEUE | INFO_FL_CLEAR(v4l2_buffer, length)), |
1954 | IOCTL_INFO_STD(VIDIOC_G_FBUF, vidioc_g_fbuf, v4l_print_framebuffer, 0), | 1960 | IOCTL_INFO_STD(VIDIOC_G_FBUF, vidioc_g_fbuf, v4l_print_framebuffer, 0), |
1955 | IOCTL_INFO_STD(VIDIOC_S_FBUF, vidioc_s_fbuf, v4l_print_framebuffer, INFO_FL_PRIO), | 1961 | IOCTL_INFO_STD(VIDIOC_S_FBUF, vidioc_s_fbuf, v4l_print_framebuffer, INFO_FL_PRIO), |
1956 | IOCTL_INFO_STD(VIDIOC_OVERLAY, vidioc_overlay, v4l_print_u32, INFO_FL_PRIO), | 1962 | IOCTL_INFO_FNC(VIDIOC_OVERLAY, v4l_overlay, v4l_print_u32, INFO_FL_PRIO), |
1957 | IOCTL_INFO_FNC(VIDIOC_QBUF, v4l_qbuf, v4l_print_buffer, INFO_FL_QUEUE), | 1963 | IOCTL_INFO_FNC(VIDIOC_QBUF, v4l_qbuf, v4l_print_buffer, INFO_FL_QUEUE), |
1958 | IOCTL_INFO_FNC(VIDIOC_DQBUF, v4l_dqbuf, v4l_print_buffer, INFO_FL_QUEUE), | 1964 | IOCTL_INFO_FNC(VIDIOC_DQBUF, v4l_dqbuf, v4l_print_buffer, INFO_FL_QUEUE), |
1959 | IOCTL_INFO_FNC(VIDIOC_STREAMON, v4l_streamon, v4l_print_buftype, INFO_FL_PRIO | INFO_FL_QUEUE), | 1965 | IOCTL_INFO_FNC(VIDIOC_STREAMON, v4l_streamon, v4l_print_buftype, INFO_FL_PRIO | INFO_FL_QUEUE), |