From: Nicholas Mc Guire Date: Mon, 16 Jan 2017 15:35:53 +0000 (+0100) Subject: iio: health: max30100: use msleep() for long uncritical delays X-Git-Tag: v4.11-rc1~116^2~272^2~24 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=18e2452a3c4e830bff9628ec0e25a814df491e30;p=linux.git iio: health: max30100: use msleep() for long uncritical delays ulseep_range() uses hrtimers and provides no advantage over msleep() for larger delays. Fix up the 35ms delays here to use msleep() and reduce the load on the hrtimer subsystem. Fixes: commit 4d33615df58b ("iio: light: add MAX30100 oximeter driver support") Link: http://lkml.org/lkml/2017/1/11/377 Signed-off-by: Nicholas Mc Guire Reviewed-by: Matt Ranostay Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/health/max30100.c b/drivers/iio/health/max30100.c index 90ab8a2d2846..9648c69ea1a2 100644 --- a/drivers/iio/health/max30100.c +++ b/drivers/iio/health/max30100.c @@ -378,7 +378,7 @@ static int max30100_get_temp(struct max30100_data *data, int *val) if (ret) return ret; - usleep_range(35000, 50000); + msleep(35); return max30100_read_temp(data, val); }