Skip to content

Commit a1fa72a

Browse files
krzkbroonie
authored andcommitted
ASoC: codecs: max9867: 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> Reviewed-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20231023095428.166563-6-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 5efc1c9 commit a1fa72a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

sound/soc/codecs/max9867.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ static int max9867_adc_dac_event(struct snd_soc_dapm_widget *w,
5656
struct max9867_priv *max9867 = snd_soc_component_get_drvdata(component);
5757
enum max9867_adc_dac adc_dac;
5858

59-
if (!strcmp(w->name, "ADCL"))
59+
if (!snd_soc_dapm_widget_name_cmp(w, "ADCL"))
6060
adc_dac = MAX9867_ADC_LEFT;
61-
else if (!strcmp(w->name, "ADCR"))
61+
else if (!snd_soc_dapm_widget_name_cmp(w, "ADCR"))
6262
adc_dac = MAX9867_ADC_RIGHT;
63-
else if (!strcmp(w->name, "DACL"))
63+
else if (!snd_soc_dapm_widget_name_cmp(w, "DACL"))
6464
adc_dac = MAX9867_DAC_LEFT;
65-
else if (!strcmp(w->name, "DACR"))
65+
else if (!snd_soc_dapm_widget_name_cmp(w, "DACR"))
6666
adc_dac = MAX9867_DAC_RIGHT;
6767
else
6868
return 0;

0 commit comments

Comments
 (0)