aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-dapm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r--sound/soc/soc-dapm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 7eb6c5c03775..91d58b56470e 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -691,7 +691,7 @@ static int dapm_mux_update_power(struct snd_soc_dapm_widget *widget,
691 return 0; 691 return 0;
692} 692}
693 693
694/* test and update the power status of a mixer widget */ 694/* test and update the power status of a mixer or switch widget */
695static int dapm_mixer_update_power(struct snd_soc_dapm_widget *widget, 695static int dapm_mixer_update_power(struct snd_soc_dapm_widget *widget,
696 struct snd_kcontrol *kcontrol, int reg, 696 struct snd_kcontrol *kcontrol, int reg,
697 int val_mask, int val, int invert) 697 int val_mask, int val, int invert)
@@ -699,7 +699,8 @@ static int dapm_mixer_update_power(struct snd_soc_dapm_widget *widget,
699 struct snd_soc_dapm_path *path; 699 struct snd_soc_dapm_path *path;
700 int found = 0; 700 int found = 0;
701 701
702 if (widget->id != snd_soc_dapm_mixer) 702 if (widget->id != snd_soc_dapm_mixer &&
703 widget->id != snd_soc_dapm_switch)
703 return -ENODEV; 704 return -ENODEV;
704 705
705 if (!snd_soc_test_bits(widget->codec, reg, val_mask, val)) 706 if (!snd_soc_test_bits(widget->codec, reg, val_mask, val))