diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-07 14:05:28 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-07 14:05:28 +0100 |
commit | dbde117c31263fb632a5bfcafe4fe769663e8991 (patch) | |
tree | 6b9eb103c5dd22a632382f2a86fd4a4c5f563098 /drivers | |
parent | 37c2578c0c40e286bc0d30bdc05290b2058cf66e (diff) | |
parent | 63cea1f735284b2244e3f031625c65373520eff9 (diff) | |
download | linux-dbde117c31263fb632a5bfcafe4fe769663e8991.tar.bz2 |
Merge tag 'gnss-4.20-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/gnss into char-misc-linus
Johan writes:
GNSS fixes for 4.20-rc6
Here's a fix for a broken activation retry loop in the sirf driver.
Included are also two MAINTAINERS updates.
All have been in linux-next with no reported issues.
Signed-off-by: Johan Hovold <johan@kernel.org>
* tag 'gnss-4.20-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/gnss:
MAINTAINERS: exclude gnss from SIRFPRIMA2 regex matching
MAINTAINERS: add gnss scm tree
gnss: sirf: fix activation retry handling
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gnss/sirf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gnss/sirf.c b/drivers/gnss/sirf.c index 71d014edd167..2c22836d3ffd 100644 --- a/drivers/gnss/sirf.c +++ b/drivers/gnss/sirf.c @@ -168,7 +168,7 @@ static int sirf_set_active(struct sirf_data *data, bool active) else timeout = SIRF_HIBERNATE_TIMEOUT; - while (retries-- > 0) { + do { sirf_pulse_on_off(data); ret = sirf_wait_for_power_state(data, active, timeout); if (ret < 0) { @@ -179,9 +179,9 @@ static int sirf_set_active(struct sirf_data *data, bool active) } break; - } + } while (retries--); - if (retries == 0) + if (retries < 0) return -ETIMEDOUT; return 0; |