Prechádzať zdrojové kódy

asoc: lpass-cdc: disable clk when they are enabled

Check if clk is enabled before disabling it to avoid
warning log during adsp SSR.

Change-Id: I916af6f9efacfe3d08e0b05dcc0c6023944369d2
Signed-off-by: Meng Wang <[email protected]>
Meng Wang 3 rokov pred
rodič
commit
cc0d0bf564
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      asoc/codecs/lpass-cdc/lpass-cdc-clk-rsc.c

+ 1 - 1
asoc/codecs/lpass-cdc/lpass-cdc-clk-rsc.c

@@ -174,7 +174,7 @@ void lpass_cdc_clk_rsc_enable_all_clocks(struct device *dev, bool enable)
 			if (priv->clk[i])
 				clk_prepare_enable(priv->clk[i]);
 		} else {
-			if (priv->clk[i])
+			if (priv->clk[i] && __clk_is_enabled(priv->clk[i]))
 				clk_disable_unprepare(priv->clk[i]);
 		}
 	}