On Wed Aug 26 16:42:45 2026 +0530, Bhoomika Hardwani wrote:
> msleep() isn't precise for delays under 20ms and relies on jiffies, which
> can lead to sleeps longer than requested, depending on the system's HZ
> configurations.
> Replace msleep(3) with usleep_range(3000, 4000) to use high-resolution
> timers, without forcing the system to wait unnecessarily.
>
> Signed-off-by: Bhoomika Hardwani <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>
Patch committed.
Thanks,
Hans Verkuil
drivers/media/radio/si4713/radio-usb-si4713.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/drivers/media/radio/si4713/radio-usb-si4713.c
b/drivers/media/radio/si4713/radio-usb-si4713.c
index 6e6764143e21..62877980fc04 100644
--- a/drivers/media/radio/si4713/radio-usb-si4713.c
+++ b/drivers/media/radio/si4713/radio-usb-si4713.c
@@ -192,7 +192,7 @@ static int si4713_send_startup_command(struct
si4713_usb_device *radio)
}
if (time_is_before_jiffies(until_jiffies))
return -EIO;
- msleep(3);
+ usleep_range(3000, 4000);
}
return retval;
@@ -339,7 +339,7 @@ static int si4713_i2c_read(struct si4713_usb_device *radio,
char *data, int len)
data[0] = 0;
return 0;
}
- msleep(3);
+ usleep_range(3000, 4000);
}
}
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]