staging: r8188eu: remove rtw_usleep_os
authorMartin Kaiser <martin@kaiser.cx>
Sun, 26 Jun 2022 18:06:03 +0000 (20:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jun 2022 11:50:38 +0000 (13:50 +0200)
Remove the rtw_usleep_os helper function. There are only two callers, both
of which call rtw_usleep_os(100). This is equivalent to msleep(1).

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Tested-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220626180603.287054-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_pwrctrl.c
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
drivers/staging/r8188eu/include/osdep_service.h
drivers/staging/r8188eu/os_dep/osdep_service.c

index 45e85b593665f30ff33bf97357c877f0bd3e1223..cf9020a73933d4bf18e0c0ed313b46f22cafe383 100644 (file)
@@ -273,7 +273,7 @@ static s32 LPS_RF_ON_check(struct adapter *padapter, u32 delay_ms)
                        err = -1;
                        break;
                }
-               rtw_usleep_os(100);
+               msleep(1);
        }
 
        return err;
index 5549e7be334ab4e11ce544e3e20ac94f68428be2..5b65313e0b9d838cdd8212606210423ea02519d1 100644 (file)
@@ -243,7 +243,7 @@ static int efuse_read_phymap_from_txpktbuf(
                        if (reg)
                                break;
 
-                       rtw_usleep_os(100);
+                       msleep(1);
                } while (time_before(jiffies, timeout));
 
                /* data from EEPROM needs to be in LE */
index 1d97d5be46d57ef6fa3d9ac4faafc1aad0c90355..72990a1cdc6615cefbcd50867cd0493206fae752 100644 (file)
@@ -76,8 +76,6 @@ void *rtw_malloc2d(int h, int w, int size);
                spin_lock_init(&((q)->lock));                   \
        } while (0)
 
-void rtw_usleep_os(int us);
-
 static inline unsigned char _cancel_timer_ex(struct timer_list *ptimer)
 {
        return del_timer_sync(ptimer);
index 812acd59be7968f4af35e7f535c97d8212ab1656..3504a0a9ba87cb31eaebfbb30660b1ce8ff6eb80 100644 (file)
@@ -42,14 +42,6 @@ Otherwise, there will be racing condition.
 Caller must check if the list is empty before calling rtw_list_delete
 */
 
-void rtw_usleep_os(int us)
-{
-       if (1 < (us / 1000))
-               msleep(1);
-       else
-               msleep((us / 1000) + 1);
-}
-
 static const struct device_type wlan_type = {
        .name = "wlan",
 };