]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
V4L/DVB (11263): gspca: Stop setting buffer type, and avoid memset in querycap
authorTrent Piepho <xyzzy@speakeasy.org>
Sun, 29 Mar 2009 01:25:35 +0000 (22:25 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 30 Mar 2009 15:43:44 +0000 (12:43 -0300)
commit5a27578667b3bd00cab909296824498bdbd732d5
tree684da677b29e234bcd3a3a020bb6428fdd13ba46
parent601bc2984508e8b70a604167229f4f687eae63bb
V4L/DVB (11263): gspca: Stop setting buffer type, and avoid memset in querycap

The v4l2-ioctl core checks the buffer type now by only allowing buffer
types for which the corresponding ->vidioc_try_fmt_xxx() methods are
defined.

This driver only defines ->vidioc_try_fmt_vid_cap() so only VIDEO_CAPTURE
buffers are allowed to be used with vidioc_g_parm.  Also,
->vidioc_enum_fmt_vid_cap() is only called for VIDEO_CAPTURE buffers.
There is no need to set the buffer type since it must already be the
correct value.

The struct which ->vidioc_querycap() is supposed to fill in is already
zeroed so it's not necessary to call memset on it.

Cc: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/gspca/gspca.c