aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio
diff options
context:
space:
mode:
authorBrian Masney <masneyb@onstation.org>2017-02-08 20:54:25 -0500
committerJonathan Cameron <jic23@kernel.org>2017-02-11 09:38:21 +0000
commit55bf851b4ad76778ce4e591dbb79006d7107cf3d (patch)
treeba6206010c0b00601ad5212800b4f2ed358b2782 /drivers/staging/iio
parentStaging: iio: meter: meter.h - style fix (diff)
downloadlinux-dev-55bf851b4ad76778ce4e591dbb79006d7107cf3d.tar.xz
linux-dev-55bf851b4ad76778ce4e591dbb79006d7107cf3d.zip
staging: iio: isl29028: change mdelay() to msleep()
This driver in some cases can busy wait for upwards of 100 ms. Since the kernel at this point is not running in atomic context, and is running in process context, we can safely use msleep() instead. This patch changes the two occurrences of mdelay() to msleep(). Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r--drivers/staging/iio/light/isl29028.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/iio/light/isl29028.c b/drivers/staging/iio/light/isl29028.c
index 6bb6d37cc7d1..8dc24c9478e8 100644
--- a/drivers/staging/iio/light/isl29028.c
+++ b/drivers/staging/iio/light/isl29028.c
@@ -121,7 +121,7 @@ static int isl29028_enable_proximity(struct isl29028_chip *chip)
return ret;
/* Wait for conversion to be complete for first sample */
- mdelay(DIV_ROUND_UP(1000, chip->prox_sampling));
+ msleep(DIV_ROUND_UP(1000, chip->prox_sampling));
return 0;
}
@@ -192,7 +192,7 @@ static int isl29028_set_als_ir_mode(struct isl29028_chip *chip,
return ret;
/* Need to wait for conversion time if ALS/IR mode enabled */
- mdelay(ISL29028_CONV_TIME_MS);
+ msleep(ISL29028_CONV_TIME_MS);
chip->als_ir_mode = mode;