summaryrefslogtreecommitdiff
path: root/drivers/media/platform/vsp1/vsp1_entity.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2015-04-13 17:43:40 +0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-07-17 16:03:43 +0300
commitadb8963f27e00273c912a53f28f7af5d14cfd32e (patch)
tree367b5ebcd62ae4e784d69bb19b880340ce7e8ebe /drivers/media/platform/vsp1/vsp1_entity.h
parentdf5c3e7c8a87a4384ff7a0adba16baae9a40a566 (diff)
downloadlinux-adb8963f27e00273c912a53f28f7af5d14cfd32e.tar.xz
[media] v4l: vsp1: Don't sleep in atomic context
The vsp1_entity_is_streaming() function is called in atomic context when queuing buffers, and sleeps due to a mutex. As the mutex just protects access to one structure field, fix this by replace the mutex with a spinlock. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/vsp1/vsp1_entity.h')
-rw-r--r--drivers/media/platform/vsp1/vsp1_entity.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_entity.h b/drivers/media/platform/vsp1/vsp1_entity.h
index 62c768d1c6aa..8867a5787c28 100644
--- a/drivers/media/platform/vsp1/vsp1_entity.h
+++ b/drivers/media/platform/vsp1/vsp1_entity.h
@@ -14,7 +14,7 @@
#define __VSP1_ENTITY_H__
#include <linux/list.h>
-#include <linux/mutex.h>
+#include <linux/spinlock.h>
#include <media/v4l2-subdev.h>
@@ -73,7 +73,7 @@ struct vsp1_entity {
struct vsp1_video *video;
- struct mutex lock; /* Protects the streaming field */
+ spinlock_t lock; /* Protects the streaming field */
bool streaming;
};