]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging: wilc1000: remove wrapper around usleep_range()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Sep 2015 16:30:51 +0000 (09:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 01:24:43 +0000 (18:24 -0700)
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>
drivers/staging/wilc1000/linux_wlan.c
drivers/staging/wilc1000/wilc_wlan.c
drivers/staging/wilc1000/wilc_wlan_if.h

index 020ed038130fa936af227a8f228e17b182aab405..afd670229834fce23ef8ccce7abdb2974de1fe4a 100644 (file)
@@ -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;
 
index 248f3d90cd9c82b5cc0a461d226e253aea6cb06d..4b37de5390a18adee5b12b51ea4f697525525924 100644 (file)
@@ -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);
                                }
index 8b8cf9ba75b401175b6b6996eef1f92b7b736cae..021a2aab0ce88fd6a0d2b01a35b0b688abb2bf38 100644 (file)
@@ -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;