gnss: sirf: fix premature wakeup interrupt enable
authorJohan Hovold <johan@kernel.org>
Tue, 22 Jan 2019 17:22:53 +0000 (18:22 +0100)
committerJohan Hovold <johan@kernel.org>
Fri, 25 Jan 2019 09:58:52 +0000 (10:58 +0100)
commit82f844c22588bf47132c82faeda50b6db473162c
tree5042e51ce950d2bee376ae0a658d0684454d3552
parent49a57857aeea06ca831043acbb0fa5e0f50602fd
gnss: sirf: fix premature wakeup interrupt enable

Make sure the receiver is powered (and booted) before enabling the
wakeup interrupt to avoid spurious interrupts due to a floating input.

Similarly, disable the interrupt before powering off on probe errors and
on unbind.

Fixes: d2efbbd18b1e ("gnss: add driver for sirfstar-based receivers")
Cc: stable <stable@vger.kernel.org> # 4.19
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/gnss/sirf.c