diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2009-03-04 01:21:03 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 12:43:06 -0300 |
commit | f3334bcbf44ad9001460508ef4fbe51e706d24cf (patch) | |
tree | 2bd63d698c882e870eb6bf7e008e0377ea443a14 /drivers | |
parent | 522a5f1430bb85ca00928b99caf3892023ad9632 (diff) |
V4L/DVB (10816): cx88: Don't need to zero ioctl parameter fields
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_input and g_tuner.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/cx88/cx88-video.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c index 5ed1c5a52cdd..2092e439ef00 100644 --- a/drivers/media/video/cx88/cx88-video.c +++ b/drivers/media/video/cx88/cx88-video.c @@ -1277,15 +1277,12 @@ int cx88_enum_input (struct cx88_core *core,struct v4l2_input *i) [ CX88_VMUX_DVB ] = "DVB", [ CX88_VMUX_DEBUG ] = "for debug only", }; - unsigned int n; + unsigned int n = i->index; - n = i->index; if (n >= 4) return -EINVAL; if (0 == INPUT(n).type) return -EINVAL; - memset(i,0,sizeof(*i)); - i->index = n; i->type = V4L2_INPUT_TYPE_CAMERA; strcpy(i->name,iname[INPUT(n).type]); if ((CX88_VMUX_TELEVISION == INPUT(n).type) || @@ -1521,7 +1518,6 @@ static int radio_g_audio (struct file *file, void *priv, struct v4l2_audio *a) if (unlikely(a->index)) return -EINVAL; - memset(a,0,sizeof(*a)); strcpy(a->name,"Radio"); return 0; } |