]> git.baikalelectronics.ru Git - kernel.git/commit
V4L/DVB (8318): OV7670: don't reject unsupported settings
authorDaniel Drake <dsd@laptop.org>
Mon, 30 Jun 2008 23:57:39 +0000 (20:57 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Sun, 20 Jul 2008 10:24:41 +0000 (07:24 -0300)
commit1a6d8c1e1f90c0064c9f7a25ce0dbf78116d455e
treeeda961f673cf6fb31536b01465192ff3b30aac10
parent2a2d91feaa740c7b113aaffa84504ab37b7672c7
V4L/DVB (8318): OV7670: don't reject unsupported settings

For VIDIOC_G_FMT/VIDIOC_TRY_FMT, the V4L2 API spec states:
"Drivers should not return an error code unless the input is ambiguous"
"Very simple, inflexible devices may even ignore all input and always
return the default parameters."
"When the requested buffer type is not supported drivers return an
EINVAL error code."
i.e. returning errors for unsupported fields is bad, and it's ok to
unconditionally overwrite user-requested settings

This patch makes ov7670 meet that behaviour, and brings it in line with
other drivers e.g. stk-webcam. It also fixes compatibility with (unpatched)
gstreamer.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/ov7670.c