ASoC: dapm: Don't use prefix for regulator name
authorPaul Cercueil <paul@crapouillou.net>
Tue, 25 Oct 2022 15:01:49 +0000 (16:01 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 26 Oct 2022 13:17:34 +0000 (14:17 +0100)
When a component has a prefix, and uses a SND_SOC_DAPM_REGULATOR_SUPPLY,
the name of the regulator should not use the prefix, otherwise it won't
be properly matched in the DT/ACPI.

Fixes: 3caac759681e ("ASoC: soc-dapm.c: fixup snd_soc_dapm_new_control_unlocked() error handling")
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Link: https://lore.kernel.org/r/20221025150149.113129-1-paul@crapouillou.net
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-dapm.c

index d515e7a78ea86892b543a4dc3c46ffe0dea1bef2..879cf1be67a9f4a7d174c43f6a69abdc27d0158a 100644 (file)
@@ -3645,7 +3645,7 @@ snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm,
 
        switch (w->id) {
        case snd_soc_dapm_regulator_supply:
-               w->regulator = devm_regulator_get(dapm->dev, w->name);
+               w->regulator = devm_regulator_get(dapm->dev, widget->name);
                if (IS_ERR(w->regulator)) {
                        ret = PTR_ERR(w->regulator);
                        goto request_failed;