media: imx: utils: Split find|enum_format into fourcc and mbus functions
authorSteve Longerbeam <slongerbeam@gmail.com>
Mon, 6 Apr 2020 16:39:03 +0000 (18:39 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 21 Apr 2020 11:21:52 +0000 (13:21 +0200)
commit74cd3984f13381049627cfa260fd87e6fcd31add
treef320c138f53d68e32aec13e76a9275e9e50dd186
parentc943b6947f459189419114682ac343fc1e22a954
media: imx: utils: Split find|enum_format into fourcc and mbus functions

To make the code easier to follow, split up find_format() into separate
search functions for pixel formats and media-bus codes, and inline
find_format() into the exported functions imx_media_find_format()
and imx_media_find_mbus_format().

Do the equivalent for enum_format().

Also add comment blocks for the exported find|enum functions.

The convenience functions imx_media_find_ipu_format() and
imx_media_enum_ipu_format() can now be made inline and moved to
imx-media.h.

Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/imx/imx-media-utils.c
drivers/staging/media/imx/imx-media.h