diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2009-03-03 20:21:03 -0800 |
---|---|---|
committer | Trent Piepho <xyzzy@speakeasy.org> | 2009-03-03 20:21:03 -0800 |
commit | 50084efb689cde7d08726a091b683d97dd12ed75 (patch) | |
tree | 23428d51af46c0db4bc18636631c3cb4caf1e782 /linux/drivers/media/video | |
parent | 0b880887bafe743d82aa67082ad82110920fb23c (diff) | |
download | mediapointer-dvb-s2-50084efb689cde7d08726a091b683d97dd12ed75.tar.gz mediapointer-dvb-s2-50084efb689cde7d08726a091b683d97dd12ed75.tar.bz2 |
stkwebcam: Don't need to zero ioctl parameter fields
From: Trent Piepho <xyzzy@speakeasy.org>
The v4l2 core code in v4l2_ioctl will zero out the structure the driver is
supposed to fill in for read-only ioctls. For read/write ioctls, all the
fields which aren't supplied from userspace will be zeroed out.
Zeroing code is removed from enum_fmt_vid_cap, g_fmt_vid_cap, and g_parm.
Priority: normal
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r-- | linux/drivers/media/video/stk-webcam.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/linux/drivers/media/video/stk-webcam.c b/linux/drivers/media/video/stk-webcam.c index 52bf877bf..54efa2cc0 100644 --- a/linux/drivers/media/video/stk-webcam.c +++ b/linux/drivers/media/video/stk-webcam.c @@ -934,8 +934,6 @@ static int stk_vidioc_s_ctrl(struct file *filp, static int stk_vidioc_enum_fmt_vid_cap(struct file *filp, void *priv, struct v4l2_fmtdesc *fmtd) { - fmtd->flags = 0; - switch (fmtd->index) { case 0: fmtd->pixelformat = V4L2_PIX_FMT_RGB565; @@ -993,7 +991,6 @@ static int stk_vidioc_g_fmt_vid_cap(struct file *filp, pix_format->height = stk_sizes[i].h; pix_format->field = V4L2_FIELD_NONE; pix_format->colorspace = V4L2_COLORSPACE_SRGB; - pix_format->priv = 0; pix_format->pixelformat = dev->vsettings.palette; if (dev->vsettings.palette == V4L2_PIX_FMT_SBGGR8) pix_format->bytesperline = pix_format->width; @@ -1247,13 +1244,10 @@ static int stk_vidioc_g_parm(struct file *filp, if (sp->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) return -EINVAL; - sp->parm.capture.capability = 0; - sp->parm.capture.capturemode = 0; /*FIXME This is not correct */ sp->parm.capture.timeperframe.numerator = 1; sp->parm.capture.timeperframe.denominator = 30; sp->parm.capture.readbuffers = 2; - sp->parm.capture.extendedmode = 0; return 0; } |