Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1559839
| From | Nicholas Mc Guire <hofrat@osadl.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] iio: health: max30100: use msleep() for long uncritical delays |
| Date | 2017-01-16 16:40 +0100 |
| Message-ID | <t0hy2-2jl-3@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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>
---
Problem located with coccinelle script
Patch was compile tested with: x86_64_defconfig + CONFIG_IIO=m +
CONFIG_MAX30100=m
Patch is aginast 4.10-rc3 (localversion-next is next-20170116)
drivers/iio/health/max30100.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/health/max30100.c b/drivers/iio/health/max30100.c
index 90ab8a2d..9648c69 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);
}
--
2.1.4
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] iio: health: max30100: use msleep() for long uncritical delays Nicholas Mc Guire <hofrat@osadl.org> - 2017-01-16 16:40 +0100
Re: [PATCH] iio: health: max30100: use msleep() for long uncritical delays Matt Ranostay <matt.ranostay@konsulko.com> - 2017-01-17 03:10 +0100
Re: [PATCH] iio: health: max30100: use msleep() for long uncritical delays Jonathan Cameron <jic23@kernel.org> - 2017-01-21 15:30 +0100
csiph-web