media: vim2m: initialize the media device earlier
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Tue, 2 Feb 2021 14:49:23 +0000 (15:49 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 22 Mar 2021 09:14:23 +0000 (10:14 +0100)
commit1a28dce222a6ece725689ad58c0cf4a1b48894f4
tree6efee494932d8327bccf7ca0c9b0f947fc860bb1
parente6a7d7c342cbd2ead32af36d3cfad51eb0a66d37
media: vim2m: initialize the media device earlier

Before the video device node is registered, the v4l2_dev.mdev
pointer must be set in order to correctly associate the video
device with the media device. Move the initialization of the
media device up.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/test-drivers/vim2m.c