staging: r8188eu: Remove wrappers _rtw_free_sema, _rtw_up_sema, and _rtw_mutex_init
authorLarry Finger <Larry.Finger@lwfinger.net>
Sun, 22 Dec 2013 23:36:41 +0000 (17:36 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2014 00:02:10 +0000 (16:02 -0800)
Any routines that are empty as a result of these changes are also removed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_cmd.c
drivers/staging/rtl8188eu/core/rtw_pwrctrl.c
drivers/staging/rtl8188eu/core/rtw_sreset.c
drivers/staging/rtl8188eu/core/rtw_xmit.c
drivers/staging/rtl8188eu/include/osdep_service.h
drivers/staging/rtl8188eu/include/rtw_pwrctrl.h
drivers/staging/rtl8188eu/os_dep/os_intfs.c
drivers/staging/rtl8188eu/os_dep/osdep_service.c
drivers/staging/rtl8188eu/os_dep/usb_intf.c

index a46aadd5472f71f5c88a33f21199fbab2cd8e468..82fe8c47a1de3f689cae5ebe1db9641f4d104517 100644 (file)
@@ -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 @@ post_process:
                rtw_free_cmd_obj(pcmd);
        } while (1);
 
-       _rtw_up_sema(&pcmdpriv->terminate_cmdthread_sema);
+       up(&pcmdpriv->terminate_cmdthread_sema);
 
 _func_exit_;
 
index c011efe8de91144d24b270cc0af20996fc41e543..4eec44735cfd28ffb57149b1f1e94d0ed0f0938a 100644 (file)
@@ -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)
index 298f75400c8fbe06f2dbf2fa5e5f102fea09fe5d..ee20d4ad004f301f27213b715008439a123fdf0d 100644 (file)
@@ -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;
index b372408028ba1512295a291d749e6a4ca73c23b6..b1af4ef7295c890c638e3670ce2b470a0aa33455 100644 (file)
@@ -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;
 
index 77829b950bc07aba5bff362ff391681f65730d66..3ea97fd391d0466082a98db29b32689d2f64c75b 100644 (file)
@@ -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);
index 3946c0302cec78154fe8bf75cf68b85802f4b5b8..4a0e9ff3d479e96e271975c611648fe43e71f83b 100644 (file)
@@ -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);
index 21ca9fe52584674a161ba61f821b21075cb545c3..92e90085feb6c2babd53ff59eb3beb9aa2444d8f 100644 (file)
@@ -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"));
index f292427011addf5868b6850bb4c623efa455ca68..23d39cc8b813470a8ddd27a5b236894c91673c27 100644 (file)
@@ -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);
index 8642397f73d1df57c3a0652c81b49b136ffb8146..32d1e977bc22df65267fb6377da400c60654bc02 100644 (file)
@@ -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);