diff options
Diffstat (limited to 'sound/soc/codecs/wm_hubs.c')
| -rw-r--r-- | sound/soc/codecs/wm_hubs.c | 21 | 
1 files changed, 11 insertions, 10 deletions
diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c index 8b50e5958de..916817fe663 100644 --- a/sound/soc/codecs/wm_hubs.c +++ b/sound/soc/codecs/wm_hubs.c @@ -50,16 +50,16 @@ static const char *speaker_ref_text[] = {  	"VMID",  }; -static const struct soc_enum speaker_ref = -	SOC_ENUM_SINGLE(WM8993_SPEAKER_MIXER, 8, 2, speaker_ref_text); +static SOC_ENUM_SINGLE_DECL(speaker_ref, +			    WM8993_SPEAKER_MIXER, 8, speaker_ref_text);  static const char *speaker_mode_text[] = {  	"Class D",  	"Class AB",  }; -static const struct soc_enum speaker_mode = -	SOC_ENUM_SINGLE(WM8993_SPKMIXR_ATTENUATION, 8, 2, speaker_mode_text); +static SOC_ENUM_SINGLE_DECL(speaker_mode, +			    WM8993_SPKMIXR_ATTENUATION, 8, speaker_mode_text);  static void wait_for_dc_servo(struct snd_soc_codec *codec, unsigned int op)  { @@ -337,7 +337,7 @@ static void enable_dc_servo(struct snd_soc_codec *codec)  static int wm8993_put_dc_servo(struct snd_kcontrol *kcontrol,  			       struct snd_ctl_elem_value *ucontrol)  { -	struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); +	struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);  	struct wm_hubs_data *hubs = snd_soc_codec_get_drvdata(codec);  	int ret; @@ -530,6 +530,7 @@ static int hp_supply_event(struct snd_soc_dapm_widget *w,  				hubs->hp_startup_mode);  			break;  		} +		break;  	case SND_SOC_DAPM_PRE_PMD:  		snd_soc_update_bits(codec, WM8993_CHARGE_PUMP_1, @@ -610,7 +611,7 @@ static int earpiece_event(struct snd_soc_dapm_widget *w,  		break;  	default: -		BUG(); +		WARN(1, "Invalid event %d\n", event);  		break;  	} @@ -734,15 +735,15 @@ static const char *hp_mux_text[] = {  	"DAC",  }; -static const struct soc_enum hpl_enum = -	SOC_ENUM_SINGLE(WM8993_OUTPUT_MIXER1, 8, 2, hp_mux_text); +static SOC_ENUM_SINGLE_DECL(hpl_enum, +			    WM8993_OUTPUT_MIXER1, 8, hp_mux_text);  const struct snd_kcontrol_new wm_hubs_hpl_mux =  	WM_HUBS_ENUM_W("Left Headphone Mux", hpl_enum);  EXPORT_SYMBOL_GPL(wm_hubs_hpl_mux); -static const struct soc_enum hpr_enum = -	SOC_ENUM_SINGLE(WM8993_OUTPUT_MIXER2, 8, 2, hp_mux_text); +static SOC_ENUM_SINGLE_DECL(hpr_enum, +			    WM8993_OUTPUT_MIXER2, 8, hp_mux_text);  const struct snd_kcontrol_new wm_hubs_hpr_mux =  	WM_HUBS_ENUM_W("Right Headphone Mux", hpr_enum);  | 
