Merge git://git.infradead.org/battery-2.6
[firefly-linux-kernel-4.4.55.git] / include / media / media-device.h
index a8390fe87e83fcd4ce59c61d0c7222717b8b531c..6a27d916c2504ac3705b865e897a1eee9276ca33 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <linux/device.h>
 #include <linux/list.h>
+#include <linux/mutex.h>
 #include <linux/spinlock.h>
 
 #include <media/media-devnode.h>
@@ -42,6 +43,7 @@
  * @entity_id: ID of the next entity to be registered
  * @entities:  List of registered entities
  * @lock:      Entities list lock
+ * @graph_mutex: Entities graph operation lock
  *
  * This structure represents an abstract high-level media device. It allows easy
  * access to entities and provides basic media device-level support. The
@@ -69,6 +71,11 @@ struct media_device {
 
        /* Protects the entities list */
        spinlock_t lock;
+       /* Serializes graph operations. */
+       struct mutex graph_mutex;
+
+       int (*link_notify)(struct media_pad *source,
+                          struct media_pad *sink, u32 flags);
 };
 
 /* media_devnode to media_device */