staging: rtl8192u: Replace mdelay with msleep in rtl8192_usb_probe
authorJia-Ju Bai <baijiaju1990@gmail.com>
Sun, 24 Dec 2017 10:16:55 +0000 (18:16 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Jan 2018 15:45:45 +0000 (16:45 +0100)
rtl8192_usb_probe is not called in an interrupt handler
nor holding a spinlock.
The function mdelay in it can be replaced with msleep,
to avoid busy wait.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
drivers/staging/rtl8192u/r8192U_core.c

index 09f66b386e44640f7f1542ef87494fa16b8a9ca6..3c300f7b6a622c1c35b2e59be03956d5d052aa35 100644 (file)
@@ -4998,7 +4998,7 @@ fail:
        kfree(priv->pFirmware);
        priv->pFirmware = NULL;
        rtl8192_usb_deleteendpoints(dev);
-       mdelay(10);
+       msleep(10);
        free_ieee80211(dev);
 
        RT_TRACE(COMP_ERR, "wlan driver load failed\n");