summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-bsc913x/bsc9131rdb/0002-take-back-DECLARE_MUTEX-for-linx.patch
blob: a648a81ff1b1b2c766518713c6a3fedcc4d404fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From: Jerry Pei <jeei@sestofb01.enea.se>
Date: Thu, 22 Dec 2011 03:55:03 +0100
Subject: [PATCH] take back DECLARE_MUTEX for linx

Signed-off-by: Jerry Pei <jeei@sestofb01.enea.se>
---
 include/linux/semaphore.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/include/linux/semaphore.h b/include/linux/semaphore.h
index 66d2591..8b75bb6 100644
--- a/include/linux/semaphore.h
+++ b/include/linux/semaphore.h
@@ -29,6 +29,9 @@ struct semaphore {
 #define DEFINE_SEMAPHORE(name, val)					\
 	struct semaphore name = __SEMAPHORE_INITIALIZER(name, val)
 
+#define DECLARE_MUTEX(name)     \
+        struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1)
+
 static inline void sema_init(struct semaphore *sem, int val)
 {
 	static struct lock_class_key __key;
-- 
1.7.5.4