Skip to content

Commit 1ac2365

Browse files
morimotobroonie
authored andcommitted
ASoC: soc-dapm: use common name for dapm
Let's use "dapm", instead of "d". This is prepare for dapm cleanup. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent fbd0911 commit 1ac2365

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

sound/soc/soc-dapm.c

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1985,29 +1985,29 @@ static void dapm_widget_update(struct snd_soc_card *card, struct snd_soc_dapm_up
19851985
*/
19861986
static void dapm_pre_sequence_async(void *data, async_cookie_t cookie)
19871987
{
1988-
struct snd_soc_dapm_context *d = data;
1988+
struct snd_soc_dapm_context *dapm = data;
19891989
int ret;
19901990

19911991
/* If we're off and we're not supposed to go into STANDBY */
1992-
if (d->bias_level == SND_SOC_BIAS_OFF &&
1993-
d->target_bias_level != SND_SOC_BIAS_OFF) {
1994-
if (d->dev && cookie)
1995-
pm_runtime_get_sync(d->dev);
1992+
if (dapm->bias_level == SND_SOC_BIAS_OFF &&
1993+
dapm->target_bias_level != SND_SOC_BIAS_OFF) {
1994+
if (dapm->dev && cookie)
1995+
pm_runtime_get_sync(dapm->dev);
19961996

1997-
ret = snd_soc_dapm_set_bias_level(d, SND_SOC_BIAS_STANDBY);
1997+
ret = snd_soc_dapm_set_bias_level(dapm, SND_SOC_BIAS_STANDBY);
19981998
if (ret != 0)
1999-
dev_err(d->dev,
1999+
dev_err(dapm->dev,
20002000
"ASoC: Failed to turn on bias: %d\n", ret);
20012001
}
20022002

20032003
/* Prepare for a transition to ON or away from ON */
2004-
if ((d->target_bias_level == SND_SOC_BIAS_ON &&
2005-
d->bias_level != SND_SOC_BIAS_ON) ||
2006-
(d->target_bias_level != SND_SOC_BIAS_ON &&
2007-
d->bias_level == SND_SOC_BIAS_ON)) {
2008-
ret = snd_soc_dapm_set_bias_level(d, SND_SOC_BIAS_PREPARE);
2004+
if ((dapm->target_bias_level == SND_SOC_BIAS_ON &&
2005+
dapm->bias_level != SND_SOC_BIAS_ON) ||
2006+
(dapm->target_bias_level != SND_SOC_BIAS_ON &&
2007+
dapm->bias_level == SND_SOC_BIAS_ON)) {
2008+
ret = snd_soc_dapm_set_bias_level(dapm, SND_SOC_BIAS_PREPARE);
20092009
if (ret != 0)
2010-
dev_err(d->dev,
2010+
dev_err(dapm->dev,
20112011
"ASoC: Failed to prepare bias: %d\n", ret);
20122012
}
20132013
}
@@ -2017,37 +2017,37 @@ static void dapm_pre_sequence_async(void *data, async_cookie_t cookie)
20172017
*/
20182018
static void dapm_post_sequence_async(void *data, async_cookie_t cookie)
20192019
{
2020-
struct snd_soc_dapm_context *d = data;
2020+
struct snd_soc_dapm_context *dapm = data;
20212021
int ret;
20222022

20232023
/* If we just powered the last thing off drop to standby bias */
2024-
if (d->bias_level == SND_SOC_BIAS_PREPARE &&
2025-
(d->target_bias_level == SND_SOC_BIAS_STANDBY ||
2026-
d->target_bias_level == SND_SOC_BIAS_OFF)) {
2027-
ret = snd_soc_dapm_set_bias_level(d, SND_SOC_BIAS_STANDBY);
2024+
if (dapm->bias_level == SND_SOC_BIAS_PREPARE &&
2025+
(dapm->target_bias_level == SND_SOC_BIAS_STANDBY ||
2026+
dapm->target_bias_level == SND_SOC_BIAS_OFF)) {
2027+
ret = snd_soc_dapm_set_bias_level(dapm, SND_SOC_BIAS_STANDBY);
20282028
if (ret != 0)
2029-
dev_err(d->dev, "ASoC: Failed to apply standby bias: %d\n",
2029+
dev_err(dapm->dev, "ASoC: Failed to apply standby bias: %d\n",
20302030
ret);
20312031
}
20322032

20332033
/* If we're in standby and can support bias off then do that */
2034-
if (d->bias_level == SND_SOC_BIAS_STANDBY &&
2035-
d->target_bias_level == SND_SOC_BIAS_OFF) {
2036-
ret = snd_soc_dapm_set_bias_level(d, SND_SOC_BIAS_OFF);
2034+
if (dapm->bias_level == SND_SOC_BIAS_STANDBY &&
2035+
dapm->target_bias_level == SND_SOC_BIAS_OFF) {
2036+
ret = snd_soc_dapm_set_bias_level(dapm, SND_SOC_BIAS_OFF);
20372037
if (ret != 0)
2038-
dev_err(d->dev, "ASoC: Failed to turn off bias: %d\n",
2038+
dev_err(dapm->dev, "ASoC: Failed to turn off bias: %d\n",
20392039
ret);
20402040

2041-
if (d->dev && cookie)
2042-
pm_runtime_put(d->dev);
2041+
if (dapm->dev && cookie)
2042+
pm_runtime_put(dapm->dev);
20432043
}
20442044

20452045
/* If we just powered up then move to active bias */
2046-
if (d->bias_level == SND_SOC_BIAS_PREPARE &&
2047-
d->target_bias_level == SND_SOC_BIAS_ON) {
2048-
ret = snd_soc_dapm_set_bias_level(d, SND_SOC_BIAS_ON);
2046+
if (dapm->bias_level == SND_SOC_BIAS_PREPARE &&
2047+
dapm->target_bias_level == SND_SOC_BIAS_ON) {
2048+
ret = snd_soc_dapm_set_bias_level(dapm, SND_SOC_BIAS_ON);
20492049
if (ret != 0)
2050-
dev_err(d->dev, "ASoC: Failed to apply active bias: %d\n",
2050+
dev_err(dapm->dev, "ASoC: Failed to apply active bias: %d\n",
20512051
ret);
20522052
}
20532053
}

0 commit comments

Comments
 (0)