media: gspca: support multiple pixel formats in TRY_FMT
authorPhilipp Zabel <philipp.zabel@gmail.com>
Fri, 14 Dec 2018 16:40:26 +0000 (11:40 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 16 Jan 2019 18:57:12 +0000 (13:57 -0500)
commitd4809b778a0899f732e808e60b3a42cfce0b5e40
tree547e4b61bf22eba269083bf9e0c8660ca91539ad
parentfc78e0b2471d6efa19f896d7c93a8ecda9913ddd
media: gspca: support multiple pixel formats in TRY_FMT

If a driver supports multiple pixel formats with the same frame size,
TRY_FMT will currently always return the first pixel format.
Fix this by adding pixelformat support to wxh_to_nearest_mode().

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/usb/gspca/gspca.c