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 | 28109ada8c6cdc6b8fb51da8cbbb7506b9da0400 (patch) | |
tree | 37d6902c2899df04c9b45dd77c0442ff5a41fd06 /linux/drivers | |
parent | 50084efb689cde7d08726a091b683d97dd12ed75 (diff) | |
download | mediapointer-dvb-s2-28109ada8c6cdc6b8fb51da8cbbb7506b9da0400.tar.gz mediapointer-dvb-s2-28109ada8c6cdc6b8fb51da8cbbb7506b9da0400.tar.bz2 |
usbvision: 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 g_audio, queryctrl, and enum_fmt_vid_cap.
Priority: normal
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/video/usbvision/usbvision-video.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/linux/drivers/media/video/usbvision/usbvision-video.c b/linux/drivers/media/video/usbvision/usbvision-video.c index 863fcb316..3d400e4b7 100644 --- a/linux/drivers/media/video/usbvision/usbvision-video.c +++ b/linux/drivers/media/video/usbvision/usbvision-video.c @@ -697,7 +697,6 @@ static int vidioc_g_audio (struct file *file, void *priv, struct v4l2_audio *a) { struct usb_usbvision *usbvision = video_drvdata(file); - memset(a,0,sizeof(*a)); if(usbvision->radio) { strcpy(a->name,"Radio"); } else { @@ -721,10 +720,6 @@ static int vidioc_queryctrl (struct file *file, void *priv, struct v4l2_queryctrl *ctrl) { struct usb_usbvision *usbvision = video_drvdata(file); - int id=ctrl->id; - - memset(ctrl,0,sizeof(*ctrl)); - ctrl->id=id; call_all(usbvision, core, queryctrl, ctrl); @@ -926,11 +921,9 @@ static int vidioc_enum_fmt_vid_cap (struct file *file, void *priv, if(vfd->index>=USBVISION_SUPPORTED_PALETTES-1) { return -EINVAL; } - vfd->flags = 0; vfd->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; strcpy(vfd->description,usbvision_v4l2_format[vfd->index].desc); vfd->pixelformat = usbvision_v4l2_format[vfd->index].format; - memset(vfd->reserved, 0, sizeof(vfd->reserved)); return 0; } |