staging: wilc1000: remove WILC_TimerDestroy()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Aug 2015 03:11:16 +0000 (20:11 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Aug 2015 03:35:53 +0000 (20:35 -0700)
It was just a wrapper around del_timer_sync() so call that instead.

Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/host_interface.c
drivers/staging/wilc1000/wilc_timer.c
drivers/staging/wilc1000/wilc_timer.h
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c

index ca806902ebb7ebef63cc805ff65cdb191d36fdba..887aec27192f37dbe34a0a03b394f305ede9c141 100644 (file)
@@ -6618,13 +6618,13 @@ _fail_mem_:
                kfree(pstrWFIDrv);
 #ifdef WILC_P2P
 _fail_timer_3:
-       WILC_TimerDestroy(&pstrWFIDrv->hRemainOnChannel);
+       del_timer_sync(&pstrWFIDrv->hRemainOnChannel);
 #endif
 _fail_timer_2:
        up(&(pstrWFIDrv->gtOsCfgValuesSem));
-       WILC_TimerDestroy(&pstrWFIDrv->hConnectTimer);
+       del_timer_sync(&pstrWFIDrv->hConnectTimer);
 _fail_timer_1:
-       WILC_TimerDestroy(&pstrWFIDrv->hScanTimer);
+       del_timer_sync(&pstrWFIDrv->hScanTimer);
 _fail_thread_:
        kthread_stop(HostIFthreadHandler);
 _fail_mq_:
@@ -6673,25 +6673,25 @@ s32 host_int_deinit(tstrWILC_WFIDrv *hWFIDrv)
        /*BugID_5348*/
        /*Destroy all timers before acquiring hSemDeinitDrvHandle*/
        /*to guarantee handling all messages befor proceeding*/
-       if (WILC_TimerDestroy(&pstrWFIDrv->hScanTimer)) {
+       if (del_timer_sync(&pstrWFIDrv->hScanTimer)) {
                PRINT_D(HOSTINF_DBG, ">> Scan timer is active\n");
                /* msleep(HOST_IF_SCAN_TIMEOUT+1000); */
        }
 
-       if (WILC_TimerDestroy(&pstrWFIDrv->hConnectTimer)) {
+       if (del_timer_sync(&pstrWFIDrv->hConnectTimer)) {
                PRINT_D(HOSTINF_DBG, ">> Connect timer is active\n");
                /* msleep(HOST_IF_CONNECT_TIMEOUT+1000); */
        }
 
 
-       if (WILC_TimerDestroy(&g_hPeriodicRSSI)) {
+       if (del_timer_sync(&g_hPeriodicRSSI)) {
                PRINT_D(HOSTINF_DBG, ">> Connect timer is active\n");
                /* msleep(HOST_IF_CONNECT_TIMEOUT+1000); */
        }
 
        #ifdef WILC_P2P
        /*Destroy Remain-onchannel Timer*/
-       WILC_TimerDestroy(&pstrWFIDrv->hRemainOnChannel);
+       del_timer_sync(&pstrWFIDrv->hRemainOnChannel);
        #endif
 
        host_int_set_wfi_drv_handler(NULL);
@@ -6715,7 +6715,7 @@ s32 host_int_deinit(tstrWILC_WFIDrv *hWFIDrv)
        memset(&strHostIFmsg, 0, sizeof(tstrHostIFmsg));
 
        if (clients_count == 1) {
-               if (WILC_TimerDestroy(&g_hPeriodicRSSI)) {
+               if (del_timer_sync(&g_hPeriodicRSSI)) {
                        PRINT_D(HOSTINF_DBG, ">> Connect timer is active\n");
                        /* msleep(HOST_IF_CONNECT_TIMEOUT+1000); */
                }
index 3617093f58f2908f2d3cdaf1c82d27c5afd9d17e..49e3419d7114f3abfae0c4ba94f7c1dda34050c9 100644 (file)
@@ -10,18 +10,6 @@ WILC_ErrNo WILC_TimerCreate(struct timer_list *pHandle,
        return s32RetStatus;
 }
 
-WILC_ErrNo WILC_TimerDestroy(struct timer_list *pHandle)
-{
-       WILC_ErrNo s32RetStatus = WILC_FAIL;
-       if (pHandle != NULL) {
-               s32RetStatus = del_timer_sync(pHandle);
-               pHandle = NULL;
-       }
-
-       return s32RetStatus;
-}
-
-
 WILC_ErrNo WILC_TimerStart(struct timer_list *pHandle, u32 u32Timeout,
        void *pvArg)
 {
index 870a6950f6cdfce120754606f619327c3f2d3e13..925c613598d5685fc87818cf6e53c516d504fd56 100644 (file)
@@ -48,23 +48,6 @@ typedef void (*tpfWILC_TimerFunction)(void *);
 WILC_ErrNo WILC_TimerCreate(struct timer_list *pHandle,
                            tpfWILC_TimerFunction pfCallback);
 
-
-/*!
- *  @brief     Destroys a given timer
- *  @details   This will destroy a given timer freeing any resources used by it
- *              if the timer was PENDING Then must be cancelled as well(i.e.
- *              goes to        IDLE, same effect as calling WILC_TimerCancel first)
- *              if the timer was EXECUTING then the callback will be allowed to
- *              finish first then all resources are freed
- *  @param[in] pHandle handle to the timer object
- *  @return    Error code indicating sucess/failure
- *  @sa                WILC_TimerAttrs
- *  @author    syounan
- *  @date      16 Aug 2010
- *  @version   1.0
- */
-WILC_ErrNo WILC_TimerDestroy(struct timer_list *pHandle);
-
 /*!
  *  @brief     Starts a given timer
  *  @details   This function will move the timer to the PENDING state until the
index 0e79bd3f964f3ba55cd8b851366b6fca7bd7c239..b29ea90da56f4eb60db7d2140c9dfd39529d008f 100644 (file)
@@ -145,7 +145,7 @@ void clear_shadow_scan(void *pUserVoid)
 {
        int i;
        if (op_ifcs == 0) {
-               WILC_TimerDestroy(&hAgingTimer);
+               del_timer_sync(&hAgingTimer);
                PRINT_INFO(CORECONFIG_DBG, "destroy aging timer\n");
 
                for (i = 0; i < u32LastScannedNtwrksCountShadow; i++) {
@@ -3876,7 +3876,7 @@ int WILC_WFI_DeInitHostInt(struct net_device *net)
        #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP
        if (op_ifcs == 0) {
                PRINT_D(CORECONFIG_DBG, "destroy during ip\n");
-               WILC_TimerDestroy(&hDuringIpTimer);
+               del_timer_sync(&hDuringIpTimer);
        }
        #endif