From: Lee Jones Date: Thu, 8 May 2014 11:06:19 +0000 (+0100) Subject: mfd: 88pm805: msleep(1ms ~ 20ms) may not do what the caller intends X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=dc543929217c828fa52bcf48be0508eb5a552bec;p=deliverable%2Flinux.git mfd: 88pm805: msleep(1ms ~ 20ms) may not do what the caller intends This code has been working since 2012, as limiting the time between 1ms and 3ms is unlikely to do any harm. Soothes checkpatch warning: WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt #161: FILE: drivers/mfd/88pm805.c:161: + msleep(1); Signed-off-by: Lee Jones --- diff --git a/drivers/mfd/88pm805.c b/drivers/mfd/88pm805.c index 64751c2a1ace..e9d50644660c 100644 --- a/drivers/mfd/88pm805.c +++ b/drivers/mfd/88pm805.c @@ -158,7 +158,7 @@ static int device_irq_init_805(struct pm80x_chip *chip) * PM805_INT_STATUS is under 32K clock domain, so need to * add proper delay before the next I2C register access. */ - msleep(1); + usleep_range(1000, 3000); if (ret < 0) goto out;