media: atomisp-gc0310: use v4l2_find_nearest_size()
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 4 Nov 2021 13:47:34 +0000 (13:47 +0000)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 15 Nov 2021 08:11:48 +0000 (08:11 +0000)
commite3b14bf8d660c28c8af37320830061ad1c6e9f08
tree52244fc11991c2ac532f46e29a00fab55ac91c15
parentb4e281666cb2ea1134e0f20445d4a6acbc810e38
media: atomisp-gc0310: use v4l2_find_nearest_size()

Instead of reinventing the wheel, use v4l2_find_nearest_size()
in order to get the closest resolution.

This should address a bug where the wrong resolution was
selected.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
drivers/staging/media/atomisp/i2c/gc0310.h