From 85eea3e7c4e6c0b3196466d9b14a8965cc751003 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Tue, 23 Dec 2008 11:35:17 +0100 Subject: v4l2-dev: allow drivers to pass v4l2_device as parent From: Hans Verkuil 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. Priority: normal Signed-off-by: Hans Verkuil --- linux/include/media/v4l2-dev.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'linux/include') diff --git a/linux/include/media/v4l2-dev.h b/linux/include/media/v4l2-dev.h index 6d76f0bce..c6cf5b1b2 100644 --- a/linux/include/media/v4l2-dev.h +++ b/linux/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 @@ -49,7 +50,10 @@ struct video_device struct class_device dev; #endif 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]; -- cgit v1.2.3