summaryrefslogtreecommitdiff
path: root/include/media
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-12-23 07:35:17 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-24 11:42:52 -0200
commit86008594e72377082c9dc1329dd6e46d6c8ca1d6 (patch)
treef330b2b9a5f51820f68feb6027ad371bfaccd34d /include/media
parent2211a98e633b81e6b366f8fa9b6ef646b19d62dc (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 @@
#define VFL_TYPE_MAX 4
struct v4l2_ioctl_callbacks;
+struct v4l2_device;
/* Flag to mark the video_device struct as unregistered.
Drivers can set this flag if they want to block all future
@@ -45,7 +46,10 @@ struct video_device
/* sysfs */
struct device dev; /* v4l device */
struct cdev *cdev; /* character device */
+
+ /* Set either parent or v4l2_dev if your driver uses v4l2_device */
struct device *parent; /* device parent */
+ struct v4l2_device *v4l2_dev; /* v4l2_device parent */
/* device info */
char name[32];