From: akpm@linux-foundation.org
To: mm-commits@vger.kernel.org
Cc: matthias@kaehlcke.net, flamingice@sourmilk.net, linville@tuxdriver.com
Subject: + convert-wpa_sem-in-a-mutex.patch added to -mm tree
Date: Fri, 15 Feb 2008 13:24:32 -0800 [thread overview]
Message-ID: <200802152124.m1FLOWVs024708@imap1.linux-foundation.org> (raw)
The patch titled
prism54: convert wpa_sem in a mutex
has been added to the -mm tree. Its filename is
convert-wpa_sem-in-a-mutex.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: prism54: convert wpa_sem in a mutex
From: Matthias Kaehlcke <matthias@kaehlcke.net>
The semaphore wpa_sem is used as mutex, convert it to the mutex API
Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Cc: Michael Wu <flamingice@sourmilk.net>
Cc: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/net/wireless/prism54/isl_ioctl.c | 10 +++++-----
drivers/net/wireless/prism54/islpci_dev.h | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff -puN drivers/net/wireless/prism54/isl_ioctl.c~convert-wpa_sem-in-a-mutex drivers/net/wireless/prism54/isl_ioctl.c
--- a/drivers/net/wireless/prism54/isl_ioctl.c~convert-wpa_sem-in-a-mutex
+++ a/drivers/net/wireless/prism54/isl_ioctl.c
@@ -2114,7 +2114,7 @@ prism54_wpa_bss_ie_add(islpci_private *p
if (wpa_ie_len > MAX_WPA_IE_LEN)
wpa_ie_len = MAX_WPA_IE_LEN;
- down(&priv->wpa_sem);
+ mutex_lock(&priv->wpa_lock);
/* try to use existing entry */
list_for_each(ptr, &priv->bss_wpa_list) {
@@ -2165,7 +2165,7 @@ prism54_wpa_bss_ie_add(islpci_private *p
kfree(bss);
}
- up(&priv->wpa_sem);
+ mutex_unlock(&priv->wpa_lock);
}
static size_t
@@ -2175,7 +2175,7 @@ prism54_wpa_bss_ie_get(islpci_private *p
struct islpci_bss_wpa_ie *bss = NULL;
size_t len = 0;
- down(&priv->wpa_sem);
+ mutex_lock(&priv->wpa_lock);
list_for_each(ptr, &priv->bss_wpa_list) {
bss = list_entry(ptr, struct islpci_bss_wpa_ie, list);
@@ -2187,7 +2187,7 @@ prism54_wpa_bss_ie_get(islpci_private *p
len = bss->wpa_ie_len;
memcpy(wpa_ie, bss->wpa_ie, len);
}
- up(&priv->wpa_sem);
+ mutex_unlock(&priv->wpa_lock);
return len;
}
@@ -2196,7 +2196,7 @@ void
prism54_wpa_bss_ie_init(islpci_private *priv)
{
INIT_LIST_HEAD(&priv->bss_wpa_list);
- sema_init(&priv->wpa_sem, 1);
+ mutex_init(&priv->wpa_lock);
}
void
diff -puN drivers/net/wireless/prism54/islpci_dev.h~convert-wpa_sem-in-a-mutex drivers/net/wireless/prism54/islpci_dev.h
--- a/drivers/net/wireless/prism54/islpci_dev.h~convert-wpa_sem-in-a-mutex
+++ a/drivers/net/wireless/prism54/islpci_dev.h
@@ -178,7 +178,7 @@ typedef struct {
int wpa; /* WPA mode enabled */
struct list_head bss_wpa_list;
int num_bss_wpa;
- struct semaphore wpa_sem;
+ struct mutex wpa_lock;
u8 wpa_ie[MAX_WPA_IE_LEN];
size_t wpa_ie_len;
_
Patches currently in -mm which might be from matthias@kaehlcke.net are
convert-acl-sem-in-a-mutex.patch
convert-stats_sem-in-a-mutex.patch
convert-wpa_sem-in-a-mutex.patch
reply other threads:[~2008-02-15 21:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200802152124.m1FLOWVs024708@imap1.linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=flamingice@sourmilk.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=matthias@kaehlcke.net \
--cc=mm-commits@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.