Commit 6dff5add authored by Jia-Ju Bai's avatar Jia-Ju Bai Committed by David S. Miller

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: default avatarJia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0df125d0
...@@ -1067,7 +1067,7 @@ static inline void setup_pegasus_II(pegasus_t *pegasus) ...@@ -1067,7 +1067,7 @@ static inline void setup_pegasus_II(pegasus_t *pegasus)
set_register(pegasus, Reg1d, 0); set_register(pegasus, Reg1d, 0);
set_register(pegasus, Reg7b, 1); set_register(pegasus, Reg7b, 1);
mdelay(100); msleep(100);
if ((pegasus->features & HAS_HOME_PNA) && mii_mode) if ((pegasus->features & HAS_HOME_PNA) && mii_mode)
set_register(pegasus, Reg7b, 0); set_register(pegasus, Reg7b, 0);
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment