ソースを参照

asoc: codecs: bolero: Do not process ssr disable if already down

If codec receives ssr disable notification when
already in disabled state do not have to process it.
This makes sure codec register access are not done when
not necessary.

Change-Id: Iafc2b03d7c707c46c69ca995d36119929c34c222
Signed-off-by: Karthikeyan Mani <[email protected]>
Karthikeyan Mani 5 年 前
コミット
91850713f5
1 ファイル変更6 行追加0 行削除
  1. 6 0
      asoc/codecs/bolero/bolero-cdc.c

+ 6 - 0
asoc/codecs/bolero/bolero-cdc.c

@@ -717,6 +717,12 @@ static void bolero_ssr_disable(struct device *dev, void *data)
 	struct bolero_priv *priv = data;
 	int macro_idx;
 
+	if (!priv->dev_up) {
+		dev_err_ratelimited(priv->dev,
+				    "%s: already disabled\n", __func__);
+		return;
+	}
+
 	bolero_cdc_notifier_call(priv, BOLERO_WCD_EVT_PA_OFF_PRE_SSR);
 	regcache_cache_only(priv->regmap, true);