Skip to contentSkip to conversation

gnss: sirf: keep wakeup IRQ enabled on failed suspend

PATCH New Avi Weiss 1 participant 1 message Oct 30 Gnss

lore
Share & tools
lore

Avi Weiss

author
#0 lore raw

PATCH 1/1 gnss: sirf: keep wakeup IRQ enabled on failed suspend

sirf_suspend() disables the wakeup IRQ even if sirf_runtime_suspend() fails. The PM core does not call sirf_resume() when this device's suspend callback fails, leaving the IRQ disabled.

Only disable the wakeup IRQ after a successful runtime suspend.

Fixes d2efbbd18b1e2 ("gnss: add driver for sirfstar-based receivers")
---
 drivers/gnss/sirf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gnss/sirf.c +1 -1
index 79375d14bbb67..2ce96598bd4fe 100644
@@ -354,7 +354,7 @@ static int __maybe_unused sirf_suspend(struct device *dev)
 	if (!pm_runtime_suspended(dev))
 		ret = sirf_runtime_suspend(dev);
 
-	if (data->wakeup)
+	if (!ret && data->wakeup)
 		disable_irq(data->irq);
 
 	return ret;

base-commit: d89e1d186ec9271bf78e62771779e9fc03bf0fc3

Signature · 1 line
2.43.0