staging: iio: tsl2x7x: use usleep_range() instead of mdelay()
authorBrian Masney <masneyb@onstation.org>
Thu, 6 Jul 2017 22:56:24 +0000 (18:56 -0400)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 9 Jul 2017 17:30:07 +0000 (18:30 +0100)
commit36a28e4a613bba376959a1b698ae0e1b23d52b59
treea1d942122fdee33488af269ada6e52500e1bfd8e
parentbe78f70ce0d11aa5767a859e1abdc522c1748c44
staging: iio: tsl2x7x: use usleep_range() instead of mdelay()

This driver in some cases can busy wait for upwards of 15ms. Since the
kernel at this point is not running in atomic context, and is running in
process context, we can safely use usleep_range() instead. This patch
changes the two occurrences of mdelay() to usleep_range().

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/light/tsl2x7x.c