diff mbox

[2/7,RFC] v4l2-device: add v4l2_prio_state to v4l2_device.

Message ID e3dcff9743201d234aca7e3577c005bc4653bfdd.1273432986.git.hverkuil@xs4all.nl (mailing list archive)
State RFC
Headers show

Commit Message

Hans Verkuil May 9, 2010, 7:29 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/media/video/v4l2-device.c b/drivers/media/video/v4l2-device.c
index 2386ae6..86ce0c9 100644
--- a/drivers/media/video/v4l2-device.c
+++ b/drivers/media/video/v4l2-device.c
@@ -34,6 +34,7 @@  int v4l2_device_register(struct device *dev, struct v4l2_device *v4l2_dev)
 
 	INIT_LIST_HEAD(&v4l2_dev->subdevs);
 	spin_lock_init(&v4l2_dev->lock);
+	v4l2_prio_init(&v4l2_dev->prio);
 	v4l2_dev->dev = dev;
 	if (dev == NULL) {
 		/* If dev == NULL, then name must be filled in by the caller */
diff --git a/include/media/v4l2-device.h b/include/media/v4l2-device.h
index b497e53..322c377 100644
--- a/include/media/v4l2-device.h
+++ b/include/media/v4l2-device.h
@@ -49,6 +49,8 @@  struct v4l2_device {
 	spinlock_t lock;
 	/* unique device name, by default the driver name + bus ID */
 	char name[V4L2_DEVICE_NAME_SIZE];
+	/* Device's priority state */
+	struct v4l2_prio_state prio;
 	/* notify callback called by some sub-devices. */
 	void (*notify)(struct v4l2_subdev *sd,
 			unsigned int notification, void *arg);