diff options
author | Dima Zavin <dima@android.com> | 2011-01-05 16:04:43 -0800 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2011-06-14 09:09:32 -0700 |
commit | f23ba5021d5c4e35f0973dd0a15aa7dceaea0293 (patch) | |
tree | 57de522ee4dcbd2c04d73966e3c05fe8f1a31c2c /drivers/net/wireless/bcm4329/dhd_linux.c | |
parent | da65eba112b2bcd1f54eb41bb0960078eba1657e (diff) | |
download | kernel_samsung_tuna-f23ba5021d5c4e35f0973dd0a15aa7dceaea0293.zip kernel_samsung_tuna-f23ba5021d5c4e35f0973dd0a15aa7dceaea0293.tar.gz kernel_samsung_tuna-f23ba5021d5c4e35f0973dd0a15aa7dceaea0293.tar.bz2 |
net: wireless: bcm4329: convert sempahore mutexes to real mutexes
Change-Id: I1cf1b0bfc2167d1be535d5066951796a569788e5
Signed-off-by: Dima Zavin <dima@android.com>
Diffstat (limited to 'drivers/net/wireless/bcm4329/dhd_linux.c')
-rw-r--r-- | drivers/net/wireless/bcm4329/dhd_linux.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/net/wireless/bcm4329/dhd_linux.c b/drivers/net/wireless/bcm4329/dhd_linux.c index c7ef3ed..f14f5e8 100644 --- a/drivers/net/wireless/bcm4329/dhd_linux.c +++ b/drivers/net/wireless/bcm4329/dhd_linux.c @@ -43,6 +43,7 @@ #include <linux/ethtool.h> #include <linux/fcntl.h> #include <linux/fs.h> +#include <linux/mutex.h> #include <asm/uaccess.h> #include <asm/unaligned.h> @@ -254,7 +255,7 @@ typedef struct dhd_info { /* OS/stack specifics */ dhd_if_t *iflist[DHD_MAX_IFS]; - struct semaphore proto_sem; + struct mutex proto_sem; wait_queue_head_t ioctl_resp_wait; struct timer_list timer; bool wd_timer_valid; @@ -265,7 +266,7 @@ typedef struct dhd_info { /* Thread based operation */ bool threads_only; - struct semaphore sdsem; + struct mutex sdsem; long watchdog_pid; struct semaphore watchdog_sem; struct completion watchdog_exited; @@ -2058,7 +2059,7 @@ dhd_attach(osl_t *osh, struct dhd_bus *bus, uint bus_hdrlen) net->netdev_ops = NULL; #endif - init_MUTEX(&dhd->proto_sem); + mutex_init(&dhd->proto_sem); /* Initialize other structure content */ init_waitqueue_head(&dhd->ioctl_resp_wait); init_waitqueue_head(&dhd->ctrl_wait); @@ -2105,7 +2106,7 @@ dhd_attach(osl_t *osh, struct dhd_bus *bus, uint bus_hdrlen) dhd->timer.function = dhd_watchdog; /* Initialize thread based operation and lock */ - init_MUTEX(&dhd->sdsem); + mutex_init(&dhd->sdsem); if ((dhd_watchdog_prio >= 0) && (dhd_dpc_prio >= 0)) { dhd->threads_only = TRUE; } @@ -2621,7 +2622,7 @@ dhd_os_proto_block(dhd_pub_t *pub) dhd_info_t *dhd = (dhd_info_t *)(pub->info); if (dhd) { - down(&dhd->proto_sem); + mutex_lock(&dhd->proto_sem); return 1; } @@ -2634,7 +2635,7 @@ dhd_os_proto_unblock(dhd_pub_t *pub) dhd_info_t *dhd = (dhd_info_t *)(pub->info); if (dhd) { - up(&dhd->proto_sem); + mutex_unlock(&dhd->proto_sem); return 1; } @@ -2773,7 +2774,7 @@ dhd_os_sdlock(dhd_pub_t *pub) dhd = (dhd_info_t *)(pub->info); if (dhd->threads_only) - down(&dhd->sdsem); + mutex_lock(&dhd->sdsem); else spin_lock_bh(&dhd->sdlock); } @@ -2786,7 +2787,7 @@ dhd_os_sdunlock(dhd_pub_t *pub) dhd = (dhd_info_t *)(pub->info); if (dhd->threads_only) - up(&dhd->sdsem); + mutex_unlock(&dhd->sdsem); else spin_unlock_bh(&dhd->sdlock); } |