aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-12-23 05:35:17 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-30 06:39:35 -0500
commit9bea3514dd4a44490b53cc52498b2967e48056dd (patch)
tree5aa2003666cd073a1aec46145fdf99147d35be28 /include/media
parentdc93a70cc7f92e1dbaf29fa7dfd914b0f618fb31 (diff)
V4L/DVB (9974): v4l2-dev: allow drivers to pass v4l2_device as parent
Drivers that use v4l2_device can set that as parent pointer in the v4l2_dev field instead of using the struct device parent field. This allows v4l2-dev.c to check whether this driver is v4l2_device based, and if so then it can offer additional services. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/v4l2-dev.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index e0d72d2c6f0e..0a88d1d17d30 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -25,6 +25,7 @@
25#define VFL_TYPE_MAX 4 25#define VFL_TYPE_MAX 4
26 26
27struct v4l2_ioctl_callbacks; 27struct v4l2_ioctl_callbacks;
28struct v4l2_device;
28 29
29/* Flag to mark the video_device struct as unregistered. 30/* Flag to mark the video_device struct as unregistered.
30 Drivers can set this flag if they want to block all future 31 Drivers can set this flag if they want to block all future
@@ -45,7 +46,10 @@ struct video_device
45 /* sysfs */ 46 /* sysfs */
46 struct device dev; /* v4l device */ 47 struct device dev; /* v4l device */
47 struct cdev *cdev; /* character device */ 48 struct cdev *cdev; /* character device */
49
50 /* Set either parent or v4l2_dev if your driver uses v4l2_device */
48 struct device *parent; /* device parent */ 51 struct device *parent; /* device parent */
52 struct v4l2_device *v4l2_dev; /* v4l2_device parent */
49 53
50 /* device info */ 54 /* device info */
51 char name[32]; 55 char name[32];