Just call the function directly, no need for the indirection.
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>
/*
* 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);
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;
**/
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);
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);
}
} 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;