diff options
author | Harald Geyer <harald@ccbib.org> | 2015-07-07 13:39:31 +0000 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-07-20 18:41:20 +0100 |
commit | 081d974031bafb204d64de3e82f398daf1d0b899 (patch) | |
tree | 6859eb7ca8777b832bb39e185f1611bebed3fa9e /drivers/pci/host/pci-layerscape.c | |
parent | 5fbb0bc466b7b43036b1dd8c9e9166ca9e69e07a (diff) |
iio: dht11: Use new function ktime_get_resolution_ns()
This cleans up the most ugly workaround in this driver. There are no
functional changes yet in the decoding algorithm, but we improve the
following things:
* Get rid of spurious warning messages on systems with fast HRTIMER.
* If the clock is not fast enough for decoding to work, we give
up immediately.
* In that case we return EAGAIN instead of EIO, so it's easier to
discriminate causes of failure.
Returning EAGAIN is somewhat controversial: It's technically correct
as a faster clock might become available. OTOH once all clocks are
enabled this is a permanent error. There is no ECLOCKTOOSLOW error
code.
Signed-off-by: Harald Geyer <harald@ccbib.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/pci/host/pci-layerscape.c')
0 files changed, 0 insertions, 0 deletions