]> pilppa.org Git - linux-2.6-omap-h63xx.git/commit
V4L/DVB (10812): v4l2: Zero out read-only ioctls in one place
authorTrent Piepho <xyzzy@speakeasy.org>
Wed, 4 Mar 2009 04:21:02 +0000 (01:21 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 30 Mar 2009 15:43:05 +0000 (12:43 -0300)
commit337f9d205972bfe1cb7982384fd0f4caa4af001d
treece1f34f16e8a952a4e356e2a40984a30a3f5ab21
parent19c96e4b7d3c80071982a052e4a921c1a39875d9
V4L/DVB (10812): v4l2: Zero out read-only ioctls in one place

If an ioctl is read-only then the driver fills in all the fields.  Lots of
times drivers only care about some fields so it's best if video_ioctl2
takes care of zeroing out the entire structure before handing it to the
driver.  This saves code in each driver to do it and driver authors often
forget.

The existing memset code in some of the read-only ioctl handlers
can be deleted.

Convert a case statement to a single if statement.

Deleted a debug line from ENUMAUDOUT that was copy-and-pasted to G_AUDOUT
by mistake.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/v4l2-ioctl.c