You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[PATCH] sem2mutex: drivers: raw, connector, dcdbas, ppp_generic
Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
9cdf18279d
commit
8ed965d612
@@ -26,6 +26,7 @@
|
||||
#include <linux/netlink.h>
|
||||
#include <linux/moduleparam.h>
|
||||
#include <linux/connector.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
#include <net/sock.h>
|
||||
|
||||
@@ -41,7 +42,7 @@ module_param(cn_val, uint, 0);
|
||||
MODULE_PARM_DESC(cn_idx, "Connector's main device idx.");
|
||||
MODULE_PARM_DESC(cn_val, "Connector's main device val.");
|
||||
|
||||
static DECLARE_MUTEX(notify_lock);
|
||||
static DEFINE_MUTEX(notify_lock);
|
||||
static LIST_HEAD(notify_list);
|
||||
|
||||
static struct cn_dev cdev;
|
||||
@@ -260,7 +261,7 @@ static void cn_notify(struct cb_id *id, u32 notify_event)
|
||||
{
|
||||
struct cn_ctl_entry *ent;
|
||||
|
||||
down(¬ify_lock);
|
||||
mutex_lock(¬ify_lock);
|
||||
list_for_each_entry(ent, ¬ify_list, notify_entry) {
|
||||
int i;
|
||||
struct cn_notify_req *req;
|
||||
@@ -293,7 +294,7 @@ static void cn_notify(struct cb_id *id, u32 notify_event)
|
||||
cn_netlink_send(&m, ctl->group, GFP_KERNEL);
|
||||
}
|
||||
}
|
||||
up(¬ify_lock);
|
||||
mutex_unlock(¬ify_lock);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -407,14 +408,14 @@ static void cn_callback(void *data)
|
||||
if (ctl->group == 0) {
|
||||
struct cn_ctl_entry *n;
|
||||
|
||||
down(¬ify_lock);
|
||||
mutex_lock(¬ify_lock);
|
||||
list_for_each_entry_safe(ent, n, ¬ify_list, notify_entry) {
|
||||
if (cn_ctl_msg_equals(ent->msg, ctl)) {
|
||||
list_del(&ent->notify_entry);
|
||||
kfree(ent);
|
||||
}
|
||||
}
|
||||
up(¬ify_lock);
|
||||
mutex_unlock(¬ify_lock);
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -429,9 +430,9 @@ static void cn_callback(void *data)
|
||||
|
||||
memcpy(ent->msg, ctl, size - sizeof(*ent));
|
||||
|
||||
down(¬ify_lock);
|
||||
mutex_lock(¬ify_lock);
|
||||
list_add(&ent->notify_entry, ¬ify_list);
|
||||
up(¬ify_lock);
|
||||
mutex_unlock(¬ify_lock);
|
||||
}
|
||||
|
||||
static int __init cn_init(void)
|
||||
|
||||
Reference in New Issue
Block a user