OSDN Git Service

media: atomisp-ov2722: use v4l2_find_nearest_size()
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 4 Nov 2021 13:17:50 +0000 (13:17 +0000)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 15 Nov 2021 08:11:47 +0000 (08:11 +0000)
commitb4e281666cb2ea1134e0f20445d4a6acbc810e38
tree987afe0b262080bea37ceb71f53b9a34236d829a
parentb7573661282c92c8a186e7bf99a7cb3119daaf80
media: atomisp-ov2722: 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-ov2722.c
drivers/staging/media/atomisp/i2c/ov2722.h