aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/zoran
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2010-12-29 12:29:55 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-30 05:02:29 -0500
commit657f2271050beabe725ba101c1d840f51a41f33d (patch)
tree740e898564868e8900ed3b61fc6d57b44e114b57 /drivers/media/video/zoran
parent3ea2b673a55cee528f83653e711d09425ed4d8b6 (diff)
[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 <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/zoran')
-rw-r--r--drivers/media/video/zoran/zoran_driver.c6
1 files changed, 0 insertions, 6 deletions
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,
2449 2449
2450 if (inp->index >= zr->card.inputs) 2450 if (inp->index >= zr->card.inputs)
2451 return -EINVAL; 2451 return -EINVAL;
2452 else {
2453 int id = inp->index;
2454 memset(inp, 0, sizeof(*inp));
2455 inp->index = id;
2456 }
2457 2452
2458 strncpy(inp->name, zr->card.input[inp->index].name, 2453 strncpy(inp->name, zr->card.input[inp->index].name,
2459 sizeof(inp->name) - 1); 2454 sizeof(inp->name) - 1);
@@ -2503,7 +2498,6 @@ static int zoran_enum_output(struct file *file, void *__fh,
2503 if (outp->index != 0) 2498 if (outp->index != 0)
2504 return -EINVAL; 2499 return -EINVAL;
2505 2500
2506 memset(outp, 0, sizeof(*outp));
2507 outp->index = 0; 2501 outp->index = 0;
2508 outp->type = V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY; 2502 outp->type = V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY;
2509 strncpy(outp->name, "Autodetect", sizeof(outp->name)-1); 2503 strncpy(outp->name, "Autodetect", sizeof(outp->name)-1);