Home
last modified time | relevance | path

Searched hist:"0 f0290089abd37ca54db764c294fe7e47624a313" (Results 1 – 1 of 1) sorted by relevance

/linux/drivers/usb/isp1760/
H A Disp1760-core.cdiff 0f0290089abd37ca54db764c294fe7e47624a313 Tue Apr 10 09:36:40 CEST 2018 Jia-Ju Bai <baijiaju1990@gmail.com> usb: isp1760: Replace mdelay with msleep in isp1760_init_core

isp1760_init_core() is never called in atomic context.

The call chains ending up at isp1760_init_core() are:
[1] isp1760_init_core() <- isp1760_register() <- isp1760_plat_probe()
[2] isp1760_init_core() <- isp1760_register() <- isp1761_pci_probe()

isp1760_plat_probe() is set as ".probe" in struct platform_driver.
isp1761_pci_probe() is set as ".probe" in struct pci_driver.
These functions are not called in atomic context.

Despite never getting called from atomic context, isp1761_pci_probe()
calls mdelay() to busily wait.
This is not necessary and can be replaced with msleep() 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>