summaryrefslogtreecommitdiffstats
path: root/include/media/media-device.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-12-09 22:47:35 +0100
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-01-11 15:18:55 +0100
commita08fad1ec80c69c79b3ffb6d84968b0952d32da1 (patch)
tree40b6e812ae1cbb72b83ebc0a3950e3a5add3846a /include/media/media-device.h
parent[media] media-device: remove interfaces and interface links (diff)
downloadlinux-a08fad1ec80c69c79b3ffb6d84968b0952d32da1.tar.xz
linux-a08fad1ec80c69c79b3ffb6d84968b0952d32da1.zip
[media] media-entity: protect object creation/removal using spin lock
Some parts of the media controller are using mutexes while others are using spin locks in order to protect creation and removal of elements in the graph. That's wrong! Also, the V4L2 core can remove graph elements on non-interactive context: BUG: sleeping function called from invalid context at include/linux/sched.h:2776 Fix it by always using spin locks for graph element addition/removal, just like entity creation/removal is protected at media-device.c Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'include/media/media-device.h')
-rw-r--r--include/media/media-device.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/media/media-device.h b/include/media/media-device.h
index 1b12774a9ab4..87ff299e1265 100644
--- a/include/media/media-device.h
+++ b/include/media/media-device.h
@@ -88,7 +88,7 @@ struct media_device {
struct list_head pads;
struct list_head links;
- /* Protects the entities list */
+ /* Protects the graph objects creation/removal */
spinlock_t lock;
/* Serializes graph operations. */
struct mutex graph_mutex;