[media] v4l: Add a media_device pointer to the v4l2_device structure
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 9 Dec 2009 11:40:05 +0000 (08:40 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 22 Mar 2011 07:53:18 +0000 (04:53 -0300)
commit95db3a60e0652a52df145aacade1a88c5acef659
tree7b8a14a964684ecd49667125e5429360e41c11d5
parente02188c90f6ef61f0844c42508fe603c5d4fa42b
[media] v4l: Add a media_device pointer to the v4l2_device structure

The pointer will later be used to register/unregister media entities
when registering/unregistering a v4l2_subdev or a video_device.

With the introduction of media devices, device drivers need to store a
pointer to a driver-specific structure in the device's drvdata.
v4l2_device can't claim ownership of the drvdata anymore.

To maintain compatibility with drivers that rely on v4l2_device storing
a pointer to itself in the device's drvdata, v4l2_device_register() will
keep doing so if the drvdata is NULL.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Documentation/video4linux/v4l2-framework.txt
drivers/media/video/v4l2-device.c
include/media/v4l2-device.h