OSDN Git Service

media: atomisp-ov2680: use v4l2_find_nearest_size()
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 3 Nov 2021 15:58:39 +0000 (15:58 +0000)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 15 Nov 2021 08:11:47 +0000 (08:11 +0000)
commitb7573661282c92c8a186e7bf99a7cb3119daaf80
treefaab0c27cbd76190ff128d75cb4a155831920de4
parent0fbca1028567aa42133198e08d1a4421e133f1a5
media: atomisp-ov2680: 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-ov2680.c
drivers/staging/media/atomisp/i2c/ov2680.h