]> asedeno.scripts.mit.edu Git - linux.git/commit
media: ov7670: don't return ENOTTY if SUBDEV_API is not set
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 17 Jul 2019 09:03:44 +0000 (05:03 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 23 Jul 2019 12:55:36 +0000 (08:55 -0400)
commitfa564e90257e5aa5b69a0c70fe59a91da3547897
treecfad0e4cf59b87429e659d253e466c24c9398fd6
parent4965bcd3c1f3d3fcade75bb8693fc1a97c7b2773
media: ov7670: don't return ENOTTY if SUBDEV_API is not set

If CONFIG_VIDEO_V4L2_SUBDEV_API is not set, then it is still possible
to call set_fmt for V4L2_SUBDEV_FORMAT_TRY, the result is just not
stored. So return 0 instead of -ENOTTY.

Calling get_fmt with V4L2_SUBDEV_FORMAT_TRY should return -EINVAL
instead of -ENOTTY, after all the get_fmt functionality is still
present, just not supported for TRY.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/i2c/ov7670.c