From: Koji Matsuoka <koji.matsuoka.xm@xxxxxxxxxxx> By Documentation/timers/timers-howto.txt, when waiting 20ms from 10us, it is correct to use usleep_range. this patch corrects it. Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@xxxxxxxxxxx> (cherry picked from horms/renesas-bsp commit af0cdba377bc8a784cdae6a77fb7a822cebc7083) Signed-off-by: Steve Longerbeam <steve_longerbeam@xxxxxxxxxx> --- drivers/media/i2c/adv748x/adv748x-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/adv748x/adv748x-core.c b/drivers/media/i2c/adv748x/adv748x-core.c index 64eb1bfda581..097e5c3a8e7e 100644 --- a/drivers/media/i2c/adv748x/adv748x-core.c +++ b/drivers/media/i2c/adv748x/adv748x-core.c @@ -273,7 +273,8 @@ static int adv748x_write_regs(struct adv748x_state *state, while (regs->page != ADV748X_PAGE_EOR) { if (regs->page == ADV748X_PAGE_WAIT) { - msleep(regs->value); + usleep_range(regs->value * 1000, + (regs->value * 1000) + 1000); } else { ret = adv748x_write(state, regs->page, regs->reg, regs->value); -- 2.19.2