[PATCH 4/4] rtl8192u: Replace semaphore rf_sem with mutex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The semaphore 'rf_sem' in rtl8192u is a simple mutex, so it should
be written as one. Semaphores are going away in the future.

Signed-off-by: Binoy Jayan <binoy.jayan@xxxxxxxxxx>
---
This patch depends on the following patch:
rtl8192u: Replace semaphore scan_sem with mutex

 drivers/staging/rtl8192u/r8192U.h      | 2 +-
 drivers/staging/rtl8192u/r8192U_core.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
index 2780838..7b921d4 100644
--- a/drivers/staging/rtl8192u/r8192U.h
+++ b/drivers/staging/rtl8192u/r8192U.h
@@ -880,7 +880,7 @@ typedef struct r8192_priv {
 	short crcmon;
 
 	struct mutex wx_mutex;
-	struct semaphore rf_sem;	/* Used to lock rf write operation */
+	struct mutex rf_mutex;	/* Used to lock rf write operation */
 
 	u8 rf_type;			/* 0: 1T2R, 1: 2T4R */
 	RT_RF_TYPE_819xU rf_chip;
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index c6d3119..46d613a 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -2374,7 +2374,7 @@ static void rtl8192_init_priv_lock(struct r8192_priv *priv)
 	spin_lock_init(&priv->tx_lock);
 	spin_lock_init(&priv->irq_lock);
 	mutex_init(&priv->wx_mutex);
-	sema_init(&priv->rf_sem, 1);
+	mutex_init(&priv->rf_mutex);
 	mutex_init(&priv->mutex);
 }
 
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux