mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-16 13:34:30 +00:00
hwmon: (sch56xx-common) Replace msleep() with usleep_range()
msleep(1) will often sleep more than 20ms, slowing down sensor and watchdog reads/writes. Use usleep_range() as recommended in timers-howto.rst to fix that. Tested on a Fujitsu Esprimo P720. Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20220131211935.3656-4-W_Armin@gmx.de Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
parent
393935baa4
commit
799c3e1e53
@ -139,7 +139,7 @@ static int sch56xx_send_cmd(u16 addr, u8 cmd, u16 reg, u8 v)
|
||||
/* EM Interface Polling "Algorithm" */
|
||||
for (i = 0; i < max_busy_polls + max_lazy_polls; i++) {
|
||||
if (i >= max_busy_polls)
|
||||
msleep(1);
|
||||
usleep_range(1000, 2000);
|
||||
/* Read Interrupt source Register */
|
||||
val = inb(addr + 8);
|
||||
/* Write Clear the interrupt source bits */
|
||||
|
Loading…
x
Reference in New Issue
Block a user