staging: rtl8188eu: add missing delay in polling loops.
Previously the code could exit with failure too early.
Signed-off-by: Rémy Oudompheng <remyoudompheng@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
index 03cf84c..2592bc2 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
@@ -62,7 +62,7 @@
start = jiffies;
while ((reg_0x88 = usb_read8(padapter, REG_HMEBOX_E0)) & control &&
jiffies_to_msecs(jiffies - start) < 1000) {
- ;
+ udelay(5);
}
reg_0x88 = usb_read8(padapter, REG_HMEBOX_E0);
@@ -242,6 +242,7 @@
status = _FAIL;
break;
}
+ udelay(5);
} while (count++);
return status;