From: Greg Kroah-Hartman Date: Sat, 15 Aug 2015 02:42:23 +0000 (-0700) Subject: staging: wilc1000: remove WILC_Sleep() X-Git-Tag: firefly_0821_release~176^2~1221^2~21 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=80e29c7a8045005e1a146d86aa4e4a8cce13688c;p=firefly-linux-kernel-4.4.55.git staging: wilc1000: remove WILC_Sleep() It was just a wrapper around usleep_range() so call that directly instead and remove the now-empty file. Cc: Johnny Kim Cc: Rachel Kim Cc: Dean Lee Cc: Chris Park Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wilc1000/Makefile b/drivers/staging/wilc1000/Makefile index ec4b8778ba04..a6bfb838c431 100644 --- a/drivers/staging/wilc1000/Makefile +++ b/drivers/staging/wilc1000/Makefile @@ -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 diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index c36479318662..aee35d2a2302 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -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; } diff --git a/drivers/staging/wilc1000/wilc_oswrapper.h b/drivers/staging/wilc1000/wilc_oswrapper.h index 652c882dbb28..374e33b528b7 100644 --- a/drivers/staging/wilc1000/wilc_oswrapper.h +++ b/drivers/staging/wilc1000/wilc_oswrapper.h @@ -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 index adab3cac64f9..000000000000 --- a/drivers/staging/wilc1000/wilc_sleep.c +++ /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 index cf9047f707a7..000000000000 --- a/drivers/staging/wilc1000/wilc_sleep.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __WILC_SLEEP_H__ -#define __WILC_SLEEP_H__ - -#include -#include - -/*! - * @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 diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 192f36cde59e..fac16db5ff6a 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -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