From 657f2271050beabe725ba101c1d840f51a41f33d Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Wed, 29 Dec 2010 14:29:55 -0300 Subject: [media] v4l: fix handling of v4l2_input.capabilities The v4l core sets the v4l2_input.capabilities field based on the supplied v4l2_ioctl_ops. However, several drivers do a memset or memcpy of the v4l2_input struct, thus overwriting that field incorrectly. Either remove the memset (which is already done by the v4l core), or add the proper capabilities field in case of a memcpy. The same is also true for v4l2_output, but that only affected the ivtv driver. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/zoran/zoran_driver.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'drivers/media/video/zoran') diff --git a/drivers/media/video/zoran/zoran_driver.c b/drivers/media/video/zoran/zoran_driver.c index 1b67b191403..fe84f17c65c 100644 --- a/drivers/media/video/zoran/zoran_driver.c +++ b/drivers/media/video/zoran/zoran_driver.c @@ -2449,11 +2449,6 @@ static int zoran_enum_input(struct file *file, void *__fh, if (inp->index >= zr->card.inputs) return -EINVAL; - else { - int id = inp->index; - memset(inp, 0, sizeof(*inp)); - inp->index = id; - } strncpy(inp->name, zr->card.input[inp->index].name, sizeof(inp->name) - 1); @@ -2503,7 +2498,6 @@ static int zoran_enum_output(struct file *file, void *__fh, if (outp->index != 0) return -EINVAL; - memset(outp, 0, sizeof(*outp)); outp->index = 0; outp->type = V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY; strncpy(outp->name, "Autodetect", sizeof(outp->name)-1); -- cgit v1.2.2