diff options
author | Jia-Ju Bai <baijiaju1990@gmail.com> | 2018-07-27 16:36:29 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-27 13:45:15 -0700 |
commit | 6dff5add089f2cedd597937a3e39a01ebba8b7c8 (patch) | |
tree | 5881f53d8180e0d6602bc66e03bece37c50d2f30 | |
parent | 0df125d05d19ea71678842289647f35cec6d3314 (diff) | |
download | op-kernel-dev-6dff5add089f2cedd597937a3e39a01ebba8b7c8.zip op-kernel-dev-6dff5add089f2cedd597937a3e39a01ebba8b7c8.tar.gz |
net: usb: pegasus: Replace mdelay() with msleep() in setup_pegasus_II()
setup_pegasus_II() is never called in atomic context.
It calls mdelay() to busily wait, which is not necessary.
mdelay() can be replaced with msleep().
This is found by a static analysis tool named DCNS written by myself.
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/usb/pegasus.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c index 6514c86..f4247b2 100644 --- a/drivers/net/usb/pegasus.c +++ b/drivers/net/usb/pegasus.c @@ -1067,7 +1067,7 @@ static inline void setup_pegasus_II(pegasus_t *pegasus) set_register(pegasus, Reg1d, 0); set_register(pegasus, Reg7b, 1); - mdelay(100); + msleep(100); if ((pegasus->features & HAS_HOME_PNA) && mii_mode) set_register(pegasus, Reg7b, 0); else |