aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/videodev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/videodev.c')
-rw-r--r--drivers/media/video/videodev.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c
index 9c539eb33811..0d56305c153e 100644
--- a/drivers/media/video/videodev.c
+++ b/drivers/media/video/videodev.c
@@ -1616,26 +1616,26 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1616 } 1616 }
1617 case VIDIOC_ENCODER_CMD: 1617 case VIDIOC_ENCODER_CMD:
1618 { 1618 {
1619 struct v4l2_encoder_cmd *p=arg; 1619 struct v4l2_encoder_cmd *p = arg;
1620 1620
1621 if (!vfd->vidioc_encoder_cmd) 1621 if (!vfd->vidioc_encoder_cmd)
1622 break; 1622 break;
1623 ret=vfd->vidioc_encoder_cmd(file, fh, p); 1623 memset(&p->raw, 0, sizeof(p->raw));
1624 ret = vfd->vidioc_encoder_cmd(file, fh, p);
1624 if (!ret) 1625 if (!ret)
1625 dbgarg (cmd, "cmd=%d, flags=%d\n", 1626 dbgarg(cmd, "cmd=%d, flags=%x\n", p->cmd, p->flags);
1626 p->cmd,p->flags);
1627 break; 1627 break;
1628 } 1628 }
1629 case VIDIOC_TRY_ENCODER_CMD: 1629 case VIDIOC_TRY_ENCODER_CMD:
1630 { 1630 {
1631 struct v4l2_encoder_cmd *p=arg; 1631 struct v4l2_encoder_cmd *p = arg;
1632 1632
1633 if (!vfd->vidioc_try_encoder_cmd) 1633 if (!vfd->vidioc_try_encoder_cmd)
1634 break; 1634 break;
1635 ret=vfd->vidioc_try_encoder_cmd(file, fh, p); 1635 memset(&p->raw, 0, sizeof(p->raw));
1636 ret = vfd->vidioc_try_encoder_cmd(file, fh, p);
1636 if (!ret) 1637 if (!ret)
1637 dbgarg (cmd, "cmd=%d, flags=%d\n", 1638 dbgarg(cmd, "cmd=%d, flags=%x\n", p->cmd, p->flags);
1638 p->cmd,p->flags);
1639 break; 1639 break;
1640 } 1640 }
1641 case VIDIOC_G_PARM: 1641 case VIDIOC_G_PARM:
@@ -1738,12 +1738,17 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1738 } 1738 }
1739 case VIDIOC_G_SLICED_VBI_CAP: 1739 case VIDIOC_G_SLICED_VBI_CAP:
1740 { 1740 {
1741 struct v4l2_sliced_vbi_cap *p=arg; 1741 struct v4l2_sliced_vbi_cap *p = arg;
1742 __u32 type = p->type;
1743
1742 if (!vfd->vidioc_g_sliced_vbi_cap) 1744 if (!vfd->vidioc_g_sliced_vbi_cap)
1743 break; 1745 break;
1744 ret=vfd->vidioc_g_sliced_vbi_cap(file, fh, p); 1746 memset(p, 0, sizeof(*p));
1747 p->type = type;
1748 ret = vfd->vidioc_g_sliced_vbi_cap(file, fh, p);
1745 if (!ret) 1749 if (!ret)
1746 dbgarg (cmd, "service_set=%d\n", p->service_set); 1750 dbgarg(cmd, "type=%d, service_set=%d\n",
1751 p->type, p->service_set);
1747 break; 1752 break;
1748 } 1753 }
1749 case VIDIOC_LOG_STATUS: 1754 case VIDIOC_LOG_STATUS: