summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses
diff options
context:
space:
mode:
authorBitan Biswas <bbiswas@nvidia.com>2019-06-11 12:51:12 +0200
committerWolfram Sang <wsa@the-dreams.de>2019-06-12 12:20:36 +0200
commitfbbe4941f0dd36b5d39a4a1796aca8ce1f8efdf5 (patch)
tree38901cd061207e4bd70e9d796323a8e5e91b6d37 /drivers/i2c/busses
parenti2c: tegra: add spinlock definition comment (diff)
downloadlinux-fbbe4941f0dd36b5d39a4a1796aca8ce1f8efdf5.tar.xz
linux-fbbe4941f0dd36b5d39a4a1796aca8ce1f8efdf5.zip
i2c: tegra: fix msleep warning
Fix checkpatch.pl WARNING for delay of approximately 1msec in flush i2c FIFO polling loop by using usleep_range(1000, 2000): WARNING: msleep < 20ms can sleep for up to 20ms; see ... Documentation/timers/timers-howto.txt + msleep(1); Signed-off-by: Bitan Biswas <bbiswas@nvidia.com> Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses')
-rw-r--r--drivers/i2c/busses/i2c-tegra.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index 29e12cae55a4..e5d41b58c99d 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -476,7 +476,7 @@ static int tegra_i2c_flush_fifos(struct tegra_i2c_dev *i2c_dev)
dev_warn(i2c_dev->dev, "timeout waiting for fifo flush\n");
return -ETIMEDOUT;
}
- msleep(1);
+ usleep_range(1000, 2000);
}
return 0;
}