提交 d9c70bbd 编写于 作者: J Jacopo Mondi 提交者: Mauro Carvalho Chehab

media: ov772x: Replace msleep(1) with usleep_range

msleep() can sleep up to 20ms.

As suggested by Documentation/timers/timers_howto.txt replace it with
usleep_range() with up to 5ms delay.
Signed-off-by: NJacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 e0853a43
...@@ -574,7 +574,7 @@ static int ov772x_reset(struct i2c_client *client) ...@@ -574,7 +574,7 @@ static int ov772x_reset(struct i2c_client *client)
if (ret < 0) if (ret < 0)
return ret; return ret;
msleep(1); usleep_range(1000, 5000);
return ov772x_mask_set(client, COM2, SOFT_SLEEP_MODE, SOFT_SLEEP_MODE); return ov772x_mask_set(client, COM2, SOFT_SLEEP_MODE, SOFT_SLEEP_MODE);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册