aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-07 08:05:28 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-07 08:05:28 -0500
commitdbde117c31263fb632a5bfcafe4fe769663e8991 (patch)
tree6b9eb103c5dd22a632382f2a86fd4a4c5f563098
parent37c2578c0c40e286bc0d30bdc05290b2058cf66e (diff)
parent63cea1f735284b2244e3f031625c65373520eff9 (diff)
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
-rw-r--r--MAINTAINERS2
-rw-r--r--drivers/gnss/sirf.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 6682420421c1..0f083103d625 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1472,6 +1472,7 @@ F: drivers/clk/sirf/
1472F: drivers/clocksource/timer-prima2.c 1472F: drivers/clocksource/timer-prima2.c
1473F: drivers/clocksource/timer-atlas7.c 1473F: drivers/clocksource/timer-atlas7.c
1474N: [^a-z]sirf 1474N: [^a-z]sirf
1475X: drivers/gnss
1475 1476
1476ARM/EBSA110 MACHINE SUPPORT 1477ARM/EBSA110 MACHINE SUPPORT
1477M: Russell King <linux@armlinux.org.uk> 1478M: Russell King <linux@armlinux.org.uk>
@@ -6316,6 +6317,7 @@ F: include/uapi/linux/gigaset_dev.h
6316 6317
6317GNSS SUBSYSTEM 6318GNSS SUBSYSTEM
6318M: Johan Hovold <johan@kernel.org> 6319M: Johan Hovold <johan@kernel.org>
6320T: git git://git.kernel.org/pub/scm/linux/kernel/git/johan/gnss.git
6319S: Maintained 6321S: Maintained
6320F: Documentation/ABI/testing/sysfs-class-gnss 6322F: Documentation/ABI/testing/sysfs-class-gnss
6321F: Documentation/devicetree/bindings/gnss/ 6323F: Documentation/devicetree/bindings/gnss/
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)
168 else 168 else
169 timeout = SIRF_HIBERNATE_TIMEOUT; 169 timeout = SIRF_HIBERNATE_TIMEOUT;
170 170
171 while (retries-- > 0) { 171 do {
172 sirf_pulse_on_off(data); 172 sirf_pulse_on_off(data);
173 ret = sirf_wait_for_power_state(data, active, timeout); 173 ret = sirf_wait_for_power_state(data, active, timeout);
174 if (ret < 0) { 174 if (ret < 0) {
@@ -179,9 +179,9 @@ static int sirf_set_active(struct sirf_data *data, bool active)
179 } 179 }
180 180
181 break; 181 break;
182 } 182 } while (retries--);
183 183
184 if (retries == 0) 184 if (retries < 0)
185 return -ETIMEDOUT; 185 return -ETIMEDOUT;
186 186
187 return 0; 187 return 0;