On Wed Sep 30 14:41:28 2026 +0800, Hermes Wu wrote:
> Use USEC_PER_MSEC instead of a bare 1000 multiplier for the
> read_poll_timeout() sleep/timeout arguments, and add the
> linux/time64.h include it comes from. Drop the needless (int) cast on
> rval, which is already declared int. Downgrade the unconditional
> per-call status log from dev_info() to dev_dbg(), since it fires on
> every call, not just failures.
> 
> Signed-off-by: Hermes Wu <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>

Patch committed.

Thanks,
Hans Verkuil

 drivers/media/i2c/it6625.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

---

diff --git a/drivers/media/i2c/it6625.c b/drivers/media/i2c/it6625.c
index 61e021afa41b..d98aa39f5ea1 100644
--- a/drivers/media/i2c/it6625.c
+++ b/drivers/media/i2c/it6625.c
@@ -16,6 +16,7 @@
 #include <linux/of_graph.h>
 #include <linux/regmap.h>
 #include <linux/slab.h>
+#include <linux/time64.h>
 #include <linux/timer.h>
 #include <linux/v4l2-dv-timings.h>
 #include <linux/videodev2.h>
@@ -505,11 +506,11 @@ static int it6625_wait_for_status(struct it6625 *it6625, 
u8 reg, u8 val,
        int timeout_round_ms = DIV_ROUND_UP(timeout_ms, sleep_ms) * sleep_ms;
 
        status = read_poll_timeout(it6625_read_byte, rval, rval == val,
-                                  sleep_ms * 1000,
-                                  timeout_round_ms * 1000,
+                                  sleep_ms * USEC_PER_MSEC,
+                                  timeout_round_ms * USEC_PER_MSEC,
                                   false, it6625, reg);
 
-       dev_info(dev, "%s status = %d %d", __func__, status, (int)rval);
+       dev_dbg(dev, "%s status = %d %d", __func__, status, rval);
        if (status < 0) {
                dev_err(dev, "%s err status = %d", __func__, status);
                return -ETIMEDOUT;
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to