]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: soc-dapm: use common name for dapm
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 1 Jul 2025 00:11:03 +0000 (00:11 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 7 Jul 2025 15:13:06 +0000 (16:13 +0100)
Let's use "dapm", instead of "d". This is prepare for dapm cleanup.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87ms9ohisp.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-dapm.c

index d4cf047bc93e00712ee820c09e88e9f2e6fc6c62..16f8eff42835aeb804fbc35712cd0931b186ed7e 100644 (file)
@@ -1985,29 +1985,29 @@ static void dapm_widget_update(struct snd_soc_card *card, struct snd_soc_dapm_up
  */
 static void dapm_pre_sequence_async(void *data, async_cookie_t cookie)
 {
-       struct snd_soc_dapm_context *d = data;
+       struct snd_soc_dapm_context *dapm = data;
        int ret;
 
        /* If we're off and we're not supposed to go into STANDBY */
-       if (d->bias_level == SND_SOC_BIAS_OFF &&
-           d->target_bias_level != SND_SOC_BIAS_OFF) {
-               if (d->dev && cookie)
-                       pm_runtime_get_sync(d->dev);
+       if (dapm->bias_level == SND_SOC_BIAS_OFF &&
+           dapm->target_bias_level != SND_SOC_BIAS_OFF) {
+               if (dapm->dev && cookie)
+                       pm_runtime_get_sync(dapm->dev);
 
-               ret = snd_soc_dapm_set_bias_level(d, SND_SOC_BIAS_STANDBY);
+               ret = snd_soc_dapm_set_bias_level(dapm, SND_SOC_BIAS_STANDBY);
                if (ret != 0)
-                       dev_err(d->dev,
+                       dev_err(dapm->dev,
                                "ASoC: Failed to turn on bias: %d\n", ret);
        }
 
        /* Prepare for a transition to ON or away from ON */
-       if ((d->target_bias_level == SND_SOC_BIAS_ON &&
-            d->bias_level != SND_SOC_BIAS_ON) ||
-           (d->target_bias_level != SND_SOC_BIAS_ON &&
-            d->bias_level == SND_SOC_BIAS_ON)) {
-               ret = snd_soc_dapm_set_bias_level(d, SND_SOC_BIAS_PREPARE);
+       if ((dapm->target_bias_level == SND_SOC_BIAS_ON &&
+            dapm->bias_level != SND_SOC_BIAS_ON) ||
+           (dapm->target_bias_level != SND_SOC_BIAS_ON &&
+            dapm->bias_level == SND_SOC_BIAS_ON)) {
+               ret = snd_soc_dapm_set_bias_level(dapm, SND_SOC_BIAS_PREPARE);
                if (ret != 0)
-                       dev_err(d->dev,
+                       dev_err(dapm->dev,
                                "ASoC: Failed to prepare bias: %d\n", ret);
        }
 }
@@ -2017,37 +2017,37 @@ static void dapm_pre_sequence_async(void *data, async_cookie_t cookie)
  */
 static void dapm_post_sequence_async(void *data, async_cookie_t cookie)
 {
-       struct snd_soc_dapm_context *d = data;
+       struct snd_soc_dapm_context *dapm = data;
        int ret;
 
        /* If we just powered the last thing off drop to standby bias */
-       if (d->bias_level == SND_SOC_BIAS_PREPARE &&
-           (d->target_bias_level == SND_SOC_BIAS_STANDBY ||
-            d->target_bias_level == SND_SOC_BIAS_OFF)) {
-               ret = snd_soc_dapm_set_bias_level(d, SND_SOC_BIAS_STANDBY);
+       if (dapm->bias_level == SND_SOC_BIAS_PREPARE &&
+           (dapm->target_bias_level == SND_SOC_BIAS_STANDBY ||
+            dapm->target_bias_level == SND_SOC_BIAS_OFF)) {
+               ret = snd_soc_dapm_set_bias_level(dapm, SND_SOC_BIAS_STANDBY);
                if (ret != 0)
-                       dev_err(d->dev, "ASoC: Failed to apply standby bias: %d\n",
+                       dev_err(dapm->dev, "ASoC: Failed to apply standby bias: %d\n",
                                ret);
        }
 
        /* If we're in standby and can support bias off then do that */
-       if (d->bias_level == SND_SOC_BIAS_STANDBY &&
-           d->target_bias_level == SND_SOC_BIAS_OFF) {
-               ret = snd_soc_dapm_set_bias_level(d, SND_SOC_BIAS_OFF);
+       if (dapm->bias_level == SND_SOC_BIAS_STANDBY &&
+           dapm->target_bias_level == SND_SOC_BIAS_OFF) {
+               ret = snd_soc_dapm_set_bias_level(dapm, SND_SOC_BIAS_OFF);
                if (ret != 0)
-                       dev_err(d->dev, "ASoC: Failed to turn off bias: %d\n",
+                       dev_err(dapm->dev, "ASoC: Failed to turn off bias: %d\n",
                                ret);
 
-               if (d->dev && cookie)
-                       pm_runtime_put(d->dev);
+               if (dapm->dev && cookie)
+                       pm_runtime_put(dapm->dev);
        }
 
        /* If we just powered up then move to active bias */
-       if (d->bias_level == SND_SOC_BIAS_PREPARE &&
-           d->target_bias_level == SND_SOC_BIAS_ON) {
-               ret = snd_soc_dapm_set_bias_level(d, SND_SOC_BIAS_ON);
+       if (dapm->bias_level == SND_SOC_BIAS_PREPARE &&
+           dapm->target_bias_level == SND_SOC_BIAS_ON) {
+               ret = snd_soc_dapm_set_bias_level(dapm, SND_SOC_BIAS_ON);
                if (ret != 0)
-                       dev_err(d->dev, "ASoC: Failed to apply active bias: %d\n",
+                       dev_err(dapm->dev, "ASoC: Failed to apply active bias: %d\n",
                                ret);
        }
 }