summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermes Wu <Hermes.wu@ite.com.tw>2026-09-30 14:41:28 +0800
committerHans Verkuil <hverkuil+cisco@kernel.org>2026-09-30 16:51:17 +0200
commitf7d93e7550f0664bb2de0cc03675f4ec36cbce9a (patch)
tree8b3c6c67a52980ce7bc396679ee0752a4e65f19a
parent1d0c655967cd0b7c97d0ae5b9d4bf18546362497 (diff)
media: i2c: it6625: clean up it6625_wait_for_status()
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 <Hermes.wu@ite.com.tw> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
-rw-r--r--drivers/media/i2c/it6625.c7
1 files 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;