summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2009-03-03 20:21:03 -0800
committerTrent Piepho <xyzzy@speakeasy.org>2009-03-03 20:21:03 -0800
commit0b880887bafe743d82aa67082ad82110920fb23c (patch)
treec370fa623f79f607929de2a22e48243a93929ae6 /linux/drivers
parentb8a69a37f416564efc1f148e4cfb3f5f95f30abb (diff)
downloadmediapointer-dvb-s2-0b880887bafe743d82aa67082ad82110920fb23c.tar.gz
mediapointer-dvb-s2-0b880887bafe743d82aa67082ad82110920fb23c.tar.bz2
cx88: 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_input and g_tuner. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/video/cx88/cx88-video.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c
index c8870cf06..005a78aab 100644
--- a/linux/drivers/media/video/cx88/cx88-video.c
+++ b/linux/drivers/media/video/cx88/cx88-video.c
@@ -1514,15 +1514,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) ||
@@ -1787,7 +1784,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;
}