diff mbox series

[17/18] media: coda: Use preferred usleep_range than udelay

Message ID 20250314152939.2759573-18-serghox@gmail.com (mailing list archive)
State New
Headers show
Series coda988 video codec support | expand

Commit Message

Sergey Khimich March 14, 2025, 3:29 p.m. UTC
From: Vladimir Yakovlev <vovchkir@gmail.com>

usleep_range is preferred over udelay.
see Documentation/timers/timers-howto.rst

Co-developed-by: Sergey Khimich <serghox@gmail.com>
Signed-off-by: Sergey Khimich <serghox@gmail.com>
Signed-off-by: Vladimir Yakovlev <vovchkir@gmail.com>
---
 drivers/media/platform/chips-media/coda/coda-common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/media/platform/chips-media/coda/coda-common.c b/drivers/media/platform/chips-media/coda/coda-common.c
index 3782219c8a2b..b73b09b3baf9 100644
--- a/drivers/media/platform/chips-media/coda/coda-common.c
+++ b/drivers/media/platform/chips-media/coda/coda-common.c
@@ -2873,7 +2873,7 @@  static int coda_hw_init(struct coda_dev *dev)
 	data = coda_read(dev, CODA_REG_BIT_CODE_RESET);
 	data |= CODA_REG_RESET_ENABLE;
 	coda_write(dev, data, CODA_REG_BIT_CODE_RESET);
-	udelay(10);
+	usleep_range(10, 20);
 	data &= ~CODA_REG_RESET_ENABLE;
 	coda_write(dev, data, CODA_REG_BIT_CODE_RESET);
 	coda_write(dev, CODA_REG_RUN_ENABLE, CODA_REG_BIT_CODE_RUN);