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 | 30469c2aeab5614b28a4de2d080481dc84f130da (patch) | |
tree | 6f090e614afcc3bcb3f80874dffe1ce2c724387d /linux | |
parent | 28109ada8c6cdc6b8fb51da8cbbb7506b9da0400 (diff) | |
download | mediapointer-dvb-s2-30469c2aeab5614b28a4de2d080481dc84f130da.tar.gz mediapointer-dvb-s2-30469c2aeab5614b28a4de2d080481dc84f130da.tar.bz2 |
gspca: 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, enum_input, g_parm and gmbuf.
Priority: normal
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/video/gspca/gspca.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/linux/drivers/media/video/gspca/gspca.c b/linux/drivers/media/video/gspca/gspca.c index 8d78b9287..d629ce1dc 100644 --- a/linux/drivers/media/video/gspca/gspca.c +++ b/linux/drivers/media/video/gspca/gspca.c @@ -1111,7 +1111,6 @@ static int vidioc_s_audio(struct file *file, void *priv, static int vidioc_g_audio(struct file *file, void *priv, struct v4l2_audio *audio) { - memset(audio, 0, sizeof *audio); strcpy(audio->name, "Microphone"); return 0; } @@ -1145,7 +1144,6 @@ static int vidioc_enum_input(struct file *file, void *priv, if (input->index != 0) return -EINVAL; - memset(input, 0, sizeof *input); input->type = V4L2_INPUT_TYPE_CAMERA; strncpy(input->name, gspca_dev->sd_desc->name, sizeof input->name); @@ -1353,7 +1351,6 @@ static int vidioc_g_parm(struct file *filp, void *priv, { struct gspca_dev *gspca_dev = priv; - memset(parm, 0, sizeof *parm); parm->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; parm->parm.capture.readbuffers = gspca_dev->nbufread; @@ -1423,7 +1420,6 @@ static int vidiocgmbuf(struct file *file, void *priv, { struct v4l2_format fmt; - memset(&fmt, 0, sizeof fmt); fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; i = gspca_dev->cam.nmodes - 1; /* highest mode */ fmt.fmt.pix.width = gspca_dev->cam.cam_mode[i].width; |