From: Greg Kroah-Hartman Date: Fri, 4 Sep 2015 16:30:51 +0000 (-0700) Subject: staging: wilc1000: remove wrapper around usleep_range() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2b922cbef153359413ec328135f21165d5f04826;p=openwrt%2Fstaging%2Fblogic.git staging: wilc1000: remove wrapper around usleep_range() Just call the function directly, no need for the indirection. Cc: Johnny Kim Cc: Rachel Kim Cc: Dean Lee Cc: Chris Park Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 020ed038130f..afd670229834 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -527,17 +527,6 @@ static void deinit_irq(linux_wlan_t *nic) /* * OS functions */ -static void linux_wlan_msleep(uint32_t msc) -{ - if (msc <= 4000000) { - u32 u32Temp = msc * 1000; - - usleep_range(u32Temp, u32Temp); - } else { - msleep(msc); - } -} - static void linux_wlan_dbg(uint8_t *buff) { PRINT_D(INIT_DBG, "%d\n", *buff); @@ -1310,7 +1299,6 @@ void linux_to_wlan(wilc_wlan_inp_t *nwi, linux_wlan_t *nic) nwi->os_context.rxq_wait_event = (void *)&g_linux_wlan->rxq_event; nwi->os_context.cfg_wait_event = (void *)&g_linux_wlan->cfg_event; - nwi->os_func.os_sleep = linux_wlan_msleep; nwi->os_func.os_debug = linux_wlan_dbg; nwi->os_func.os_wait = linux_wlan_lock_timeout; diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 248f3d90cd9c..4b37de5390a1 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -999,7 +999,7 @@ static int wilc_wlan_handle_txq(uint32_t *pu32TxqCount) **/ PRINT_WRN(GENERIC_DBG, "[wilc txq]: warn, vmm table not clear yet, wait...\n"); release_bus(RELEASE_ALLOW_SLEEP); - p->os_func.os_sleep(3); /* wait 3 ms */ + usleep_range(3000, 3000); acquire_bus(ACQUIRE_AND_WAKEUP); } } while (!p->quit); @@ -1049,7 +1049,7 @@ static int wilc_wlan_handle_txq(uint32_t *pu32TxqCount) break; } else { release_bus(RELEASE_ALLOW_SLEEP); - p->os_func.os_sleep(3); /* wait 3 ms */ + usleep_range(3000, 3000); acquire_bus(ACQUIRE_AND_WAKEUP); PRINT_WRN(GENERIC_DBG, "Can't get VMM entery - reg = %2x\n", reg); } diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index 8b8cf9ba75b4..021a2aab0ce8 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -84,7 +84,6 @@ typedef struct { } sdio_cmd53_t; typedef struct { - void (*os_sleep)(uint32_t); void (*os_debug)(uint8_t *); int (*os_wait)(void *, u32); } wilc_wlan_os_func_t;