summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorAndrey Konovalov <andrey.konovalov@linaro.org>2020-06-23 18:52:26 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-07-19 14:08:30 +0200
commit8e5652ae8d4addb99db9ccc0112827dfe3026276 (patch)
tree98a4ec5cd6b7926763166606f93df0c86861392c /drivers/media
parent8d4a696af361af57bb84f3cc063473d241afc638 (diff)
media: i2c: imx290: replace msleep(10) with usleep_range(10000, 11000)
This fixes checkpatch warnings of "msleep < 20ms can sleep for up to 20ms". Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/i2c/imx290.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/i2c/imx290.c b/drivers/media/i2c/imx290.c
index 9c97830164e9..adcddf3204f7 100644
--- a/drivers/media/i2c/imx290.c
+++ b/drivers/media/i2c/imx290.c
@@ -406,7 +406,7 @@ static int imx290_set_register_array(struct imx290 *imx290,
}
/* Provide 10ms settle time */
- msleep(10);
+ usleep_range(10000, 11000);
return 0;
}
@@ -484,14 +484,14 @@ static int imx290_set_ctrl(struct v4l2_ctrl *ctrl)
if (ctrl->val) {
imx290_write_reg(imx290, IMX290_BLKLEVEL_LOW, 0x00);
imx290_write_reg(imx290, IMX290_BLKLEVEL_HIGH, 0x00);
- msleep(10);
+ usleep_range(10000, 11000);
imx290_write_reg(imx290, IMX290_PGCTRL,
(u8)(IMX290_PGCTRL_REGEN |
IMX290_PGCTRL_THRU |
IMX290_PGCTRL_MODE(ctrl->val)));
} else {
imx290_write_reg(imx290, IMX290_PGCTRL, 0x00);
- msleep(10);
+ usleep_range(10000, 11000);
if (imx290->bpp == 10)
imx290_write_reg(imx290, IMX290_BLKLEVEL_LOW,
0x3c);