diff options
| author | Bhoomika Hardwani <bhoomika.hardwani@gmail.com> | 2026-08-26 16:42:45 +0530 |
|---|---|---|
| committer | Hans Verkuil <hverkuil+cisco@kernel.org> | 2026-09-08 15:10:04 +0200 |
| commit | 2bea8516a561685a9aef2e3a3584c871e28df289 (patch) | |
| tree | 9291a9f68b7ddbf5371e4d0bf1d824208e4dbc0b | |
| parent | 53637d9250df031946e17894dea149cefc4f9b92 (diff) | |
| download | linux-next-2bea8516a561685a9aef2e3a3584c871e28df289.tar.gz linux-next-2bea8516a561685a9aef2e3a3584c871e28df289.zip | |
media: radio: si4713: replace msleep() with usleep_range() for delays less than 20ms
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 <bhoomika.hardwani@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
| -rw-r--r-- | drivers/media/radio/si4713/radio-usb-si4713.c | 4 |
1 files 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); } } |
