]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
staging: rtl8192u: Replace mdelay with usleep_range in rtl8192_usb_disconnect
authorJia-Ju Bai <baijiaju1990@gmail.com>
Tue, 10 Apr 2018 12:25:09 +0000 (20:25 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Apr 2018 13:51:34 +0000 (15:51 +0200)
commit6c93c63a634ae7036d699a1e7f2121a9f2dee5fe
tree53bc78957fd9024bb231cf2e36161f28bd1dbad9
parenta40c973eebe61aa9242f5501d5d5598778e3bea2
staging: rtl8192u: Replace mdelay with usleep_range in rtl8192_usb_disconnect

rtl8192_usb_disconnect() is never called in atomic context.

rtl8192_usb_disconnect() is only set as ".disconnect" in
struct usb_driver.

Despite never getting called from atomic context,
rtl8192_usb_disconnect() calls mdelay() to busily wait.
This is not necessary and can be replaced with usleep_range() to
avoid busy waiting.

This is found by a static analysis tool named DCNS written by myself.
And I also manually check it.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/r8192U_core.c