staging: wilc1000: remove WILC_Sleep()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Aug 2015 02:42:23 +0000 (19:42 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Aug 2015 03:35:21 +0000 (20:35 -0700)
It was just a wrapper around usleep_range() so call that directly
instead and remove the now-empty file.

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/Makefile
drivers/staging/wilc1000/host_interface.c
drivers/staging/wilc1000/wilc_oswrapper.h
drivers/staging/wilc1000/wilc_sleep.c [deleted file]
drivers/staging/wilc1000/wilc_sleep.h [deleted file]
drivers/staging/wilc1000/wilc_wlan.c

index ec4b8778ba0408265f6677d2734e3a472a29b9fd..a6bfb838c431390dc551716c301a4b63f0c84edb 100644 (file)
@@ -26,7 +26,7 @@ ccflags-$(CONFIG_WILC1000_DYNAMICALLY_ALLOCATE_MEMROY) += -DWILC_NORMAL_ALLOC
 
 
 wilc1000-objs := wilc_wfi_cfgoperations.o linux_wlan.o linux_mon.o \
-                       wilc_memory.o wilc_msgqueue.o wilc_sleep.o \
+                       wilc_memory.o wilc_msgqueue.o \
                        wilc_timer.o coreconfigurator.o host_interface.o \
                        wilc_sdio.o wilc_spi.o wilc_wlan_cfg.o wilc_debugfs.o
 
index c36479318662e930318546101bf9ee42e95df166..aee35d2a23022973390d2870d6b533c69b239d83 100644 (file)
@@ -4339,7 +4339,7 @@ static int hostIFthread(void *pvArg)
                /*Re-Queue HIF message*/
                if ((!g_wilc_initialized)) {
                        PRINT_D(GENERIC_DBG, "--WAIT--");
-                       WILC_Sleep(200);
+                       usleep_range(200 * 1000, 200 * 1000);
                        WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL);
                        continue;
                }
@@ -4347,7 +4347,7 @@ static int hostIFthread(void *pvArg)
                if (strHostIFmsg.u16MsgId == HOST_IF_MSG_CONNECT && pstrWFIDrv->strWILC_UsrScanReq.pfUserScanResult != NULL) {
                        PRINT_D(HOSTINF_DBG, "Requeue connect request till scan done received\n");
                        WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL);
-                       WILC_Sleep(2);
+                       usleep_range(2 * 1000, 2 * 1000);
                        continue;
                }
 
index 652c882dbb28caf1703ac6234f62b53518178adc..374e33b528b7c64cf322a9a66316bcc42610c350 100644 (file)
@@ -23,9 +23,6 @@
 /* Error reporting and handling support */
 #include "wilc_errorsupport.h"
 
-/* Sleep support */
-#include "wilc_sleep.h"
-
 /* Timer support */
 #include "wilc_timer.h"
 
diff --git a/drivers/staging/wilc1000/wilc_sleep.c b/drivers/staging/wilc1000/wilc_sleep.c
deleted file mode 100644 (file)
index adab3ca..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-
-#include "wilc_sleep.h"
-
-/*
- *  @author    mdaftedar
- *  @date      10 Aug 2010
- *  @version   1.0
- */
-void WILC_Sleep(u32 u32TimeMilliSec)
-{
-       if (u32TimeMilliSec <= 4000000) {
-               u32 u32Temp = u32TimeMilliSec * 1000;
-               usleep_range(u32Temp, u32Temp);
-       } else {
-               msleep(u32TimeMilliSec);
-       }
-
-}
diff --git a/drivers/staging/wilc1000/wilc_sleep.h b/drivers/staging/wilc1000/wilc_sleep.h
deleted file mode 100644 (file)
index cf9047f..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef __WILC_SLEEP_H__
-#define __WILC_SLEEP_H__
-
-#include <linux/types.h>
-#include <linux/delay.h>
-
-/*!
- *  @brief     forces the current thread to sleep until the given time has elapsed
- *  @param[in] u32TimeMilliSec Time to sleep in Milli seconds
- *  @sa                WILC_SleepMicrosec
- *  @author    syounan
- *  @date      10 Aug 2010
- *  @version   1.0
- *  @note      This function offers a relatively innacurate and low resolution
- *              sleep, for accurate high resolution sleep use u32TimeMicoSec
- */
-/* TODO: remove and open-code in callers */
-void WILC_Sleep(u32 u32TimeMilliSec);
-
-#endif
index 192f36cde59e61838b0d16ea9f2a9b454b18f4df..fac16db5ff6a296ec00644434a4b01d5238d4ef3 100644 (file)
@@ -730,7 +730,7 @@ INLINE void chip_wakeup(void)
 
                        do {
                                /* Wait for the chip to stabilize*/
-                               WILC_Sleep(2);
+                               usleep_range(2 * 1000, 2 * 1000);
                                /* Make sure chip is awake. This is an extra step that can be removed */
                                /* later to avoid the bus access overhead */
                                if ((wilc_get_chipid(true) == 0)) {
@@ -753,7 +753,7 @@ INLINE void chip_wakeup(void)
                        /* If still off, redo the wake up sequence */
                        while (((clk_status_reg & 0x1) == 0) && (((++trials) % 3) == 0)) {
                                /* Wait for the chip to stabilize*/
-                               WILC_Sleep(2);
+                               usleep_range(2 * 1000, 2 * 1000);
 
                                /* Make sure chip is awake. This is an extra step that can be removed */
                                /* later to avoid the bus access overhead */
@@ -1408,7 +1408,7 @@ static void wilc_wlan_handle_isr_ext(uint32_t int_status)
                buffer = p->os_func.os_malloc(size);
                if (buffer == NULL) {
                        wilc_debug(N_ERR, "[wilc isr]: fail alloc host memory...drop the packets (%d)\n", size);
-                       WILC_Sleep(100);
+                       usleep_range(100 * 1000, 100 * 1000);
                        goto _end_;
                }
 #endif