[media] call media_device_init() before registering the V4L2 device
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 28 Dec 2015 11:24:23 +0000 (09:24 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 11 Jan 2016 14:19:25 +0000 (12:19 -0200)
commit2e7508e40f6391762499d802226d8a31b0ea3944
tree9e387787970c59d9da8cb38087a4ba96d9718bb6
parent7c9d6731acf2816cd94e6c51f02ac8348dc7bb7e
[media] call media_device_init() before registering the V4L2 device

Currently, v4l2_device_register() doesn't use the media_device
struct. So, calling media_device_init() could be called either
before or after v4l2_device_register().

Yet, it is a good practice to initialize everything before calling
the register functions. Also, the other drivers call
media_device_init() before registering the V4L2 device.

So, move the call for media_device_init() to happen earlier on
exynos4-is and s3c-camif.

This is just a cleanup patch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/exynos4-is/media-dev.c
drivers/media/platform/s3c-camif/camif-core.c