mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-21 11:44:01 +08:00
staging: gdm724x: Replace semaphore netlink with mutex
Replace semaphore netlink_mutex with mutex. Semaphores are going away in the future. Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
49bb9af078
commit
bf5cad613a
@ -14,6 +14,7 @@
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/export.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/netlink.h>
|
||||
#include <asm/byteorder.h>
|
||||
@ -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(&netlink_mutex);
|
||||
#endif
|
||||
|
||||
sock = netlink_kernel_create(&init_net, unit, &cfg);
|
||||
|
||||
if (sock)
|
||||
|
Loading…
Reference in New Issue
Block a user