Fix checkpatch.pl issue: "CHECK: usleep_range is preferred over
udelay;
see Documentation/timers/timers-howto.txt".
Replace `udelay()` with a call to `usleep_range()` with a reasonable
upper limit determined by the other sleeping functions present.
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
i = 10;
tmp16 = r8712_read16(padapter, TCR);
while (((tmp16 & _IMEM_CODE_DONE) == 0) && (i > 0)) {
- udelay(10);
+ usleep_range(10, 1000);
tmp16 = r8712_read16(padapter, TCR);
i--;
}
i = 5;
tmp16 = r8712_read16(padapter, TCR);
while (((tmp16 & _EMEM_CODE_DONE) == 0) && (i > 0)) {
- udelay(10);
+ usleep_range(10, 1000);
tmp16 = r8712_read16(padapter, TCR);
i--;
}