]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: staging: ipu3-imgu: Set fields before media_entity_pads_init()
authorHidenori Kobayashi <hidenorik@chromium.org>
Tue, 9 Jan 2024 08:09:09 +0000 (17:09 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2024 13:28:15 +0000 (15:28 +0200)
commit1992f2af644477808eb05c53ba4afd5399429c37
treeb0c762c87e7be54c0c842495e8fdffe2f835f2bd
parente76f6b9618e80b3725dc35d59759fa1d01a02523
media: staging: ipu3-imgu: Set fields before media_entity_pads_init()

[ Upstream commit 87318b7092670d4086bfec115a0280a60c51c2dd ]

The imgu driver fails to probe with the following message because it
does not set the pad's flags before calling media_entity_pads_init().

[   14.596315] ipu3-imgu 0000:00:05.0: failed initialize subdev media entity (-22)
[   14.596322] ipu3-imgu 0000:00:05.0: failed to register subdev0 ret (-22)
[   14.596327] ipu3-imgu 0000:00:05.0: failed to register pipes (-22)
[   14.596331] ipu3-imgu 0000:00:05.0: failed to create V4L2 devices (-22)

Fix the initialization order so that the driver probe succeeds. The ops
initialization is also moved together for readability.

Fixes: a0ca1627b450 ("media: staging/intel-ipu3: Add v4l2 driver based on media framework")
Cc: <stable@vger.kernel.org> # 6.7
Cc: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Hidenori Kobayashi <hidenorik@chromium.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/media/ipu3/ipu3-v4l2.c