Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1b34fd390c340b0554dcda9552f82d77dff8ed23
Commit:     1b34fd390c340b0554dcda9552f82d77dff8ed23
Parent:     1e3428e9e327a6e4163b3674b260dbd719f59839
Author:     Matthias Kaehlcke <[EMAIL PROTECTED]>
AuthorDate: Mon Nov 5 09:41:01 2007 +0100
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 15:03:32 2008 -0800

    Prism54: Convert mgmt_sem to the mutex API
    
    Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
---
 drivers/net/wireless/prism54/islpci_dev.c |    2 +-
 drivers/net/wireless/prism54/islpci_dev.h |    3 ++-
 drivers/net/wireless/prism54/islpci_mgt.c |    4 ++--
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/prism54/islpci_dev.c 
b/drivers/net/wireless/prism54/islpci_dev.c
index 219dd65..dbb538c 100644
--- a/drivers/net/wireless/prism54/islpci_dev.c
+++ b/drivers/net/wireless/prism54/islpci_dev.c
@@ -861,7 +861,7 @@ islpci_setup(struct pci_dev *pdev)
        init_waitqueue_head(&priv->reset_done);
 
        /* init the queue read locks, process wait counter */
-       sema_init(&priv->mgmt_sem, 1);
+       mutex_init(&priv->mgmt_lock);
        priv->mgmt_received = NULL;
        init_waitqueue_head(&priv->mgmt_wqueue);
        sema_init(&priv->stats_sem, 1);
diff --git a/drivers/net/wireless/prism54/islpci_dev.h 
b/drivers/net/wireless/prism54/islpci_dev.h
index 736666d..4e0182c 100644
--- a/drivers/net/wireless/prism54/islpci_dev.h
+++ b/drivers/net/wireless/prism54/islpci_dev.h
@@ -26,6 +26,7 @@
 #include <linux/wireless.h>
 #include <net/iw_handler.h>
 #include <linux/list.h>
+#include <linux/mutex.h>
 
 #include "isl_38xx.h"
 #include "isl_oid.h"
@@ -164,7 +165,7 @@ typedef struct {
        wait_queue_head_t reset_done;
 
        /* used by islpci_mgt_transaction */
-       struct semaphore mgmt_sem; /* serialize access to mailbox and wqueue */
+       struct mutex mgmt_lock; /* serialize access to mailbox and wqueue */
        struct islpci_mgmtframe *mgmt_received;   /* mbox for incoming frame */
        wait_queue_head_t mgmt_wqueue;            /* waitqueue for mbox */
 
diff --git a/drivers/net/wireless/prism54/islpci_mgt.c 
b/drivers/net/wireless/prism54/islpci_mgt.c
index 2246f79..f7c677e 100644
--- a/drivers/net/wireless/prism54/islpci_mgt.c
+++ b/drivers/net/wireless/prism54/islpci_mgt.c
@@ -460,7 +460,7 @@ islpci_mgt_transaction(struct net_device *ndev,
 
        *recvframe = NULL;
 
-       if (down_interruptible(&priv->mgmt_sem))
+       if (mutex_lock_interruptible(&priv->mgmt_lock))
                return -ERESTARTSYS;
 
        prepare_to_wait(&priv->mgmt_wqueue, &wait, TASK_UNINTERRUPTIBLE);
@@ -504,7 +504,7 @@ islpci_mgt_transaction(struct net_device *ndev,
        /* TODO: we should reset the device here */
  out:
        finish_wait(&priv->mgmt_wqueue, &wait);
-       up(&priv->mgmt_sem);
+       mutex_unlock(&priv->mgmt_lock);
        return err;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to