i2c: tegra: fix msleep warning
authorBitan Biswas <bbiswas@nvidia.com>
Tue, 11 Jun 2019 10:51:12 +0000 (03:51 -0700)
committerWolfram Sang <wsa@the-dreams.de>
Wed, 12 Jun 2019 10:20:36 +0000 (12:20 +0200)
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>
drivers/i2c/busses/i2c-tegra.c

index 29e12ca..e5d41b5 100644 (file)
@@ -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;
 }