iio: health: max30100: use msleep() for long uncritical delays
authorNicholas Mc Guire <hofrat@osadl.org>
Mon, 16 Jan 2017 15:35:53 +0000 (16:35 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sun, 22 Jan 2017 13:21:28 +0000 (13:21 +0000)
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 <hofrat@osadl.org>
Reviewed-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/health/max30100.c

index 90ab8a2d2846f8a8591ee6b1615dce2c984020ef..9648c69ea1a2062b9297d8fd8c6701d88a08c3e4 100644 (file)
@@ -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);
 }