media: mtk-vcodec: replace func vidioc_try_fmt with two funcs for out/cap
authorDafna Hirschfeld <dafna.hirschfeld@collabora.com>
Wed, 17 Nov 2021 13:06:33 +0000 (14:06 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 30 Nov 2021 11:19:00 +0000 (12:19 +0100)
commitba0b00e7930b477eba4cf1de1b62ae68949911b7
tree0bd11e3b19e749321e88b60aef8949f7a20d8a6b
parent71c789760ff9ba4b687c2f8aa828045ca525c517
media: mtk-vcodec: replace func vidioc_try_fmt with two funcs for out/cap

The function vidioc_try_fmt has a big 'if-else' for
the capture and output cases. There is hardly any code
outside of that condition. It is therefore better to split
that functions into two different functions, one for each case.

Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c