Commit 2ca4ab53 authored by Larry Finger's avatar Larry Finger Committed by Greg Kroah-Hartman

staging: r8188eu: Remove wrappers _rtw_free_sema, _rtw_up_sema, and _rtw_mutex_init

Any routines that are empty as a result of these changes are also removed.
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent efbef100
......@@ -121,9 +121,6 @@ void _rtw_free_cmd_priv (struct cmd_priv *pcmdpriv)
_func_enter_;
if (pcmdpriv) {
_rtw_free_sema(&(pcmdpriv->cmd_queue_sema));
_rtw_free_sema(&(pcmdpriv->terminate_cmdthread_sema));
if (pcmdpriv->cmd_allocated_buf)
kfree(pcmdpriv->cmd_allocated_buf);
......@@ -257,7 +254,7 @@ _func_enter_;
res = _rtw_enqueue_cmd(&pcmdpriv->cmd_queue, cmd_obj);
if (res == _SUCCESS)
_rtw_up_sema(&pcmdpriv->cmd_queue_sema);
up(&pcmdpriv->cmd_queue_sema);
exit:
......@@ -282,7 +279,7 @@ void rtw_cmd_clr_isr(struct cmd_priv *pcmdpriv)
{
_func_enter_;
pcmdpriv->cmd_done_cnt++;
/* _rtw_up_sema(&(pcmdpriv->cmd_done_sema)); */
/* up(&(pcmdpriv->cmd_done_sema)); */
_func_exit_;
}
......@@ -325,7 +322,7 @@ _func_enter_;
pcmdbuf = pcmdpriv->cmd_buf;
pcmdpriv->cmdthd_running = true;
_rtw_up_sema(&pcmdpriv->terminate_cmdthread_sema);
up(&pcmdpriv->terminate_cmdthread_sema);
RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, ("start r871x rtw_cmd_thread !!!!\n"));
......@@ -411,7 +408,7 @@ _func_enter_;
rtw_free_cmd_obj(pcmd);
} while (1);
_rtw_up_sema(&pcmdpriv->terminate_cmdthread_sema);
up(&pcmdpriv->terminate_cmdthread_sema);
_func_exit_;
......
......@@ -524,13 +524,6 @@ _func_exit_;
void rtw_free_pwrctrl_priv(struct adapter *adapter)
{
struct pwrctrl_priv *pwrctrlpriv = &adapter->pwrctrlpriv;
_func_enter_;
_free_pwrlock(&pwrctrlpriv->lock);
_func_exit_;
}
u8 rtw_interface_ps_func(struct adapter *padapter, enum hal_intf_ps_func efunc_id, u8 *val)
......
......@@ -25,7 +25,7 @@ void sreset_init_value(struct adapter *padapter)
struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter);
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
_rtw_mutex_init(&psrtpriv->silentreset_mutex);
mutex_init(&psrtpriv->silentreset_mutex);
psrtpriv->silent_reset_inprogress = false;
psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS;
psrtpriv->last_tx_time = 0;
......
......@@ -219,7 +219,7 @@ _func_enter_;
pxmitpriv->voq_cnt = 0;
pxmitpriv->ack_tx = false;
_rtw_mutex_init(&pxmitpriv->ack_tx_mutex);
mutex_init(&pxmitpriv->ack_tx_mutex);
rtw_sctx_init(&pxmitpriv->ack_tx_ops, 0);
rtw_hal_init_xmit_priv(padapter);
......@@ -231,12 +231,6 @@ _func_exit_;
return res;
}
static void rtw_mfree_xmit_priv_lock (struct xmit_priv *pxmitpriv)
{
_rtw_free_sema(&pxmitpriv->xmit_sema);
_rtw_free_sema(&pxmitpriv->terminate_xmitthread_sema);
}
void _rtw_free_xmit_priv (struct xmit_priv *pxmitpriv)
{
int i;
......@@ -250,8 +244,6 @@ void _rtw_free_xmit_priv (struct xmit_priv *pxmitpriv)
rtw_hal_free_xmit_priv(padapter);
rtw_mfree_xmit_priv_lock(pxmitpriv);
if (pxmitpriv->pxmit_frame_buf == NULL)
goto out;
......
......@@ -256,10 +256,7 @@ void rtw_list_insert_head(struct list_head *plist, struct list_head *phead);
void rtw_list_insert_tail(struct list_head *plist, struct list_head *phead);
void rtw_list_delete(struct list_head *plist);
void _rtw_free_sema(struct semaphore *sema);
void _rtw_up_sema(struct semaphore *sema);
u32 _rtw_down_sema(struct semaphore *sema);
void _rtw_mutex_init(struct mutex *pmutex);
void _rtw_mutex_free(struct mutex *pmutex);
void _rtw_init_queue(struct __queue *pqueue);
......
......@@ -102,11 +102,6 @@ static inline void _init_pwrlock(struct semaphore *plock)
sema_init(plock, 1);
}
static inline void _free_pwrlock(struct semaphore *plock)
{
_rtw_free_sema(plock);
}
static inline void _enter_pwrlock(struct semaphore *plock)
{
_rtw_down_sema(plock);
......@@ -114,7 +109,7 @@ static inline void _enter_pwrlock(struct semaphore *plock)
static inline void _exit_pwrlock(struct semaphore *plock)
{
_rtw_up_sema(plock);
up(plock);
}
#define LPS_DELAY_TIME 1*HZ /* 1 sec */
......@@ -251,7 +246,6 @@ struct pwrctrl_priv {
(pwrctrl)->pwr_state_check_interval)
void rtw_init_pwrctrl_priv(struct adapter *adapter);
void rtw_free_pwrctrl_priv(struct adapter *adapter);
void rtw_set_ps_mode(struct adapter *adapter, u8 ps_mode, u8 smart_ps,
u8 bcn_ant_mode);
......
......@@ -761,7 +761,7 @@ void rtw_stop_drv_threads(struct adapter *padapter)
RT_TRACE(_module_os_intfs_c_, _drv_info_, ("+rtw_stop_drv_threads\n"));
/* Below is to termindate rtw_cmd_thread & event_thread... */
_rtw_up_sema(&padapter->cmdpriv.cmd_queue_sema);
up(&padapter->cmdpriv.cmd_queue_sema);
if (padapter->cmdThread)
_rtw_down_sema(&padapter->cmdpriv.terminate_cmdthread_sema);
......@@ -990,8 +990,6 @@ u8 rtw_free_drv_sw(struct adapter *padapter)
_rtw_free_recv_priv(&padapter->recvpriv);
rtw_free_pwrctrl_priv(padapter);
rtw_hal_free_data(padapter);
RT_TRACE(_module_os_intfs_c_, _drv_info_, ("<== rtw_free_drv_sw\n"));
......
......@@ -161,15 +161,6 @@ void rtw_list_insert_tail(struct list_head *plist, struct list_head *phead)
Caller must check if the list is empty before calling rtw_list_delete
*/
void _rtw_free_sema(struct semaphore *sema)
{
}
void _rtw_up_sema(struct semaphore *sema)
{
up(sema);
}
u32 _rtw_down_sema(struct semaphore *sema)
{
if (down_interruptible(sema))
......@@ -178,11 +169,6 @@ u32 _rtw_down_sema(struct semaphore *sema)
return _SUCCESS;
}
void _rtw_mutex_init(struct mutex *pmutex)
{
mutex_init(pmutex);
}
void _rtw_mutex_free(struct mutex *pmutex)
{
mutex_destroy(pmutex);
......
......@@ -126,7 +126,7 @@ static u8 rtw_init_intf_priv(struct dvobj_priv *dvobj)
{
u8 rst = _SUCCESS;
_rtw_mutex_init(&dvobj->usb_vendor_req_mutex);
mutex_init(&dvobj->usb_vendor_req_mutex);
dvobj->usb_alloc_vendor_req_buf = rtw_zmalloc(MAX_USB_IO_CTL_SIZE);
if (dvobj->usb_alloc_vendor_req_buf == NULL) {
......@@ -867,7 +867,7 @@ static int __init rtw_drv_entry(void)
DBG_88E(DRV_NAME " driver version=%s\n", DRIVERVERSION);
DBG_88E("build time: %s %s\n", __DATE__, __TIME__);
_rtw_mutex_init(&usb_drv->hw_init_mutex);
mutex_init(&usb_drv->hw_init_mutex);
usb_drv->drv_registered = true;
return usb_register(&usb_drv->usbdrv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment