浏览代码

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 年之前
父节点
当前提交
cc0d0bf564
共有 1 个文件被更改,包括 1 次插入1 次删除
  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]);
 		}
 	}