media: atomisp-gc2235: use v4l2_find_nearest_size()
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 4 Nov 2021 13:57:35 +0000 (13:57 +0000)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 15 Nov 2021 08:11:48 +0000 (08:11 +0000)
commitc286a3a0286bf70590720541b8408dbc3cd930a5
treeb7ad946ef76734785f6f5c3448ff7b935fb0fc54
parente3b14bf8d660c28c8af37320830061ad1c6e9f08
media: atomisp-gc2235: 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-gc2235.c
drivers/staging/media/atomisp/i2c/gc2235.h