gnss: sirf: fix premature wakeup interrupt enable
authorJohan Hovold <johan@kernel.org>
Tue, 22 Jan 2019 17:22:53 +0000 (18:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 Mar 2019 06:17:21 +0000 (07:17 +0100)
commit09675c2f84bc6fff4d4bb0d4587876d5daa0b107
treedb562a2d22921f2918f67883db5078321292182c
parentc426de69ded0d41c7fe56302597c4d5bf9c734fc
gnss: sirf: fix premature wakeup interrupt enable

commit 82f844c22588bf47132c82faeda50b6db473162c upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gnss/sirf.c