Browse Source

soc: add check condition before enabling irq.

Enable interrupt request only when the interrupt is
in disabled state.

Change-Id: I67795bf0ee344661e02b0fec3181cd7980d56652
Signed-off-by: Vignesh Kulothungan <[email protected]>
Ashwini Muduganti 4 years ago
parent
commit
7c9ef4221e
1 changed files with 3 additions and 1 deletions
  1. 3 1
      soc/swr-mstr-ctrl.c

+ 3 - 1
soc/swr-mstr-ctrl.c

@@ -3250,7 +3250,9 @@ static int swrm_runtime_suspend(struct device *dev)
 		}
 
 		if (swrm->clk_stop_mode0_supp) {
-			if (swrm->wake_irq > 0) {
+			if ((swrm->wake_irq > 0) &&
+			    (irqd_irq_disabled(
+			    irq_get_irq_data(swrm->wake_irq)))) {
 				enable_irq(swrm->wake_irq);
 			} else if (swrm->ipc_wakeup) {
 				msm_aud_evt_blocking_notifier_call_chain(