diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-12-15 07:58:18 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-01-11 12:19:14 -0200 |
commit | 5c883edb5b2c34e96e57037c95f9a72c4feccc50 (patch) | |
tree | 784c80c3b0bbc947073b78d3e2f3471c4acc141b /drivers/media | |
parent | 75c7e295707e7a9d13691377f2154dcbae9a25f8 (diff) |
[media] media-entity: use mutes for link setup
Changeset f8fd4c61b5ae ("[media] media-entity: protect object
creation/removal using spin lock") changed the object creation/removal
protection to spin lock, as this is what's used on media-device,
keeping the mutex reserved for graph traversal routines. However, it
also changed the link setup, by mistake.
This could cause troubles, as the link setup can affect the graph
traversal, and this is likely the reason for a mutex there.
So, revert media_entity_setup_link() to use mutex.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/media-entity.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c index 4822763dcefa..f88740b12879 100644 --- a/drivers/media/media-entity.c +++ b/drivers/media/media-entity.c @@ -662,9 +662,9 @@ int media_entity_setup_link(struct media_link *link, u32 flags) { int ret; - spin_lock(&link->source->entity->graph_obj.mdev->lock); + mutex_lock(&link->graph_obj.mdev->graph_mutex); ret = __media_entity_setup_link(link, flags); - spin_unlock(&link->source->entity->graph_obj.mdev->lock); + mutex_unlock(&link->graph_obj.mdev->graph_mutex); return ret; } |