[PATCH v2] staging: gdm724x: Replace semaphore netlink with mutex

2016-06-14 Thread Binoy Jayan
Replace semaphore netlink_mutex with mutex. Semaphores are
going away in the future.

Signed-off-by: Binoy Jayan 
Reviewed-by: Arnd Bergmann 
---
 drivers/staging/gdm724x/netlink_k.c | 11 +--
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/staging/gdm724x/netlink_k.c 
b/drivers/staging/gdm724x/netlink_k.c
index a0232e8..abe2425 100644
--- a/drivers/staging/gdm724x/netlink_k.c
+++ b/drivers/staging/gdm724x/netlink_k.c
@@ -14,6 +14,7 @@
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -21,13 +22,7 @@
 
 #include "netlink_k.h"
 
-#if defined(DEFINE_MUTEX)
 static DEFINE_MUTEX(netlink_mutex);
-#else
-static struct semaphore netlink_mutex;
-#define mutex_lock(x)  down(x)
-#define mutex_unlock(x)up(x)
-#endif
 
 #define ND_MAX_GROUP   30
 #define ND_IFINDEX_LEN sizeof(int)
@@ -96,10 +91,6 @@ struct sock *netlink_init(int unit,
.input  = netlink_rcv,
};
 
-#if !defined(DEFINE_MUTEX)
-   init_MUTEX(_mutex);
-#endif
-
sock = netlink_kernel_create(_net, unit, );
 
if (sock)
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project



[PATCH v2] staging: gdm724x: Replace semaphore netlink with mutex

2016-06-14 Thread Binoy Jayan
Replace semaphore netlink_mutex with mutex. Semaphores are
going away in the future.

Signed-off-by: Binoy Jayan 
Reviewed-by: Arnd Bergmann 
---
 drivers/staging/gdm724x/netlink_k.c | 11 +--
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/staging/gdm724x/netlink_k.c 
b/drivers/staging/gdm724x/netlink_k.c
index a0232e8..abe2425 100644
--- a/drivers/staging/gdm724x/netlink_k.c
+++ b/drivers/staging/gdm724x/netlink_k.c
@@ -14,6 +14,7 @@
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -21,13 +22,7 @@
 
 #include "netlink_k.h"
 
-#if defined(DEFINE_MUTEX)
 static DEFINE_MUTEX(netlink_mutex);
-#else
-static struct semaphore netlink_mutex;
-#define mutex_lock(x)  down(x)
-#define mutex_unlock(x)up(x)
-#endif
 
 #define ND_MAX_GROUP   30
 #define ND_IFINDEX_LEN sizeof(int)
@@ -96,10 +91,6 @@ struct sock *netlink_init(int unit,
.input  = netlink_rcv,
};
 
-#if !defined(DEFINE_MUTEX)
-   init_MUTEX(_mutex);
-#endif
-
sock = netlink_kernel_create(_net, unit, );
 
if (sock)
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project