The semaphore 'rf_sem' in the rtl8192e 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@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
return 0;
if (priv->rtllib->eRFPowerState != eRfOn && !priv->being_init_adapter)
return 0;
- down(&priv->rf_sem);
+ mutex_lock(&priv->rf_mutex);
if (priv->Rf_Mode == RF_OP_By_FW) {
Original_Value = _rtl92e_phy_rf_fw_read(dev, eRFPath, RegAddr);
udelay(200);
}
BitShift = _rtl92e_calculate_bit_shift(BitMask);
Readback_Value = (Original_Value & BitMask) >> BitShift;
- up(&priv->rf_sem);
+ mutex_unlock(&priv->rf_mutex);
return Readback_Value;
}
spin_lock_init(&priv->rf_ps_lock);
spin_lock_init(&priv->ps_lock);
mutex_init(&priv->wx_mutex);
- sema_init(&priv->rf_sem, 1);
+ mutex_init(&priv->rf_mutex);
mutex_init(&priv->mutex);
}
struct tasklet_struct irq_prepare_beacon_tasklet;
struct mutex wx_mutex;
- struct semaphore rf_sem;
+ struct mutex rf_mutex;
struct mutex mutex;
struct rt_stats stats;