Skip to content

Commit e2d38e1

Browse files
krzkbroonie
authored andcommitted
ASoC: codecs: rtq9128: Handle component name prefix
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20231023095428.166563-8-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent b2056ce commit e2d38e1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

sound/soc/codecs/rtq9128.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,11 +291,11 @@ static int rtq9128_dac_power_event(struct snd_soc_dapm_widget *w, struct snd_kco
291291

292292
dev_dbg(comp->dev, "%s: %s event %d\n", __func__, w->name, event);
293293

294-
if (strcmp(w->name, "DAC1") == 0)
294+
if (snd_soc_dapm_widget_name_cmp(w, "DAC1") == 0)
295295
shift = 6;
296-
else if (strcmp(w->name, "DAC2") == 0)
296+
else if (snd_soc_dapm_widget_name_cmp(w, "DAC2") == 0)
297297
shift = 4;
298-
else if (strcmp(w->name, "DAC3") == 0)
298+
else if (snd_soc_dapm_widget_name_cmp(w, "DAC3") == 0)
299299
shift = 2;
300300
else
301301
shift = 0;

0 commit comments

Comments
 (0)