From 9cfb6a3f1b16e82fab97831265858aa2d1983883 Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Tue, 3 Mar 2009 20:44:45 -0300 Subject: V4L/DVB (10794): v4l2: Move code to zero querybuf output struct to v4l2_ioctl For VIDIOC_QUERYBUF only the first two fields, size and type, are used as input. The rest can be filled in by the driver as output. Most drivers do not actually use all the field and unused ones should be zeroed out. Some drivers have code to do this and some drivers should but don't. So put some zero out code in v4l2_ioctl so that all drivers using that system get it. The drivers that have zeroing code get that code removed. Some drivers checked that the type field was valid, but v4l2_ioctl already does this so those checks can be removed as well. Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/meye.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'drivers/media/video/meye.c') diff --git a/drivers/media/video/meye.c b/drivers/media/video/meye.c index b76e33d5c86..163fb2b329d 100644 --- a/drivers/media/video/meye.c +++ b/drivers/media/video/meye.c @@ -1446,10 +1446,6 @@ static int vidioc_querybuf(struct file *file, void *fh, struct v4l2_buffer *buf) if (index < 0 || index >= gbuffers) return -EINVAL; - memset(buf, 0, sizeof(*buf)); - - buf->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - buf->index = index; buf->bytesused = meye.grab_buffer[index].size; buf->flags = V4L2_BUF_FLAG_MAPPED; -- cgit v1.2.3