media: vim2m: initialize the media device earlier
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Tue, 2 Feb 2021 14:49:23 +0000 (15:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Jun 2022 06:33:49 +0000 (08:33 +0200)
commit5a73bd4f47104c3402a3268ed414b9284267bd67
tree7532fc78abf453d309b7f80079f58903189b8286
parentb7248281afb165ebd2f64dfd5ef4de3c5cc2a81f
media: vim2m: initialize the media device earlier

commit 1a28dce222a6ece725689ad58c0cf4a1b48894f4 upstream.

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>
Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/platform/vim2m.c