@@ -179,7 +179,7 @@ static int cs35l56_hda_mixer_info(struct snd_kcontrol *kcontrol,
179179static int cs35l56_hda_mixer_get (struct snd_kcontrol * kcontrol ,
180180 struct snd_ctl_elem_value * ucontrol )
181181{
182- struct cs35l56_hda * cs35l56 = ( struct cs35l56_hda * ) kcontrol -> private_data ;
182+ struct cs35l56_hda * cs35l56 = snd_kcontrol_chip ( kcontrol ) ;
183183 unsigned int reg_val ;
184184 int i ;
185185
@@ -201,7 +201,7 @@ static int cs35l56_hda_mixer_get(struct snd_kcontrol *kcontrol,
201201static int cs35l56_hda_mixer_put (struct snd_kcontrol * kcontrol ,
202202 struct snd_ctl_elem_value * ucontrol )
203203{
204- struct cs35l56_hda * cs35l56 = ( struct cs35l56_hda * ) kcontrol -> private_data ;
204+ struct cs35l56_hda * cs35l56 = snd_kcontrol_chip ( kcontrol ) ;
205205 unsigned int item = ucontrol -> value .enumerated .item [0 ];
206206 bool changed ;
207207
@@ -230,7 +230,7 @@ static int cs35l56_hda_posture_info(struct snd_kcontrol *kcontrol,
230230static int cs35l56_hda_posture_get (struct snd_kcontrol * kcontrol ,
231231 struct snd_ctl_elem_value * ucontrol )
232232{
233- struct cs35l56_hda * cs35l56 = ( struct cs35l56_hda * ) kcontrol -> private_data ;
233+ struct cs35l56_hda * cs35l56 = snd_kcontrol_chip ( kcontrol ) ;
234234 unsigned int pos ;
235235 int ret ;
236236
@@ -248,7 +248,7 @@ static int cs35l56_hda_posture_get(struct snd_kcontrol *kcontrol,
248248static int cs35l56_hda_posture_put (struct snd_kcontrol * kcontrol ,
249249 struct snd_ctl_elem_value * ucontrol )
250250{
251- struct cs35l56_hda * cs35l56 = ( struct cs35l56_hda * ) kcontrol -> private_data ;
251+ struct cs35l56_hda * cs35l56 = snd_kcontrol_chip ( kcontrol ) ;
252252 unsigned long pos = ucontrol -> value .integer .value [0 ];
253253 bool changed ;
254254 int ret ;
@@ -297,7 +297,7 @@ static int cs35l56_hda_vol_info(struct snd_kcontrol *kcontrol,
297297static int cs35l56_hda_vol_get (struct snd_kcontrol * kcontrol ,
298298 struct snd_ctl_elem_value * ucontrol )
299299{
300- struct cs35l56_hda * cs35l56 = ( struct cs35l56_hda * ) kcontrol -> private_data ;
300+ struct cs35l56_hda * cs35l56 = snd_kcontrol_chip ( kcontrol ) ;
301301 unsigned int raw_vol ;
302302 int vol ;
303303 int ret ;
@@ -323,7 +323,7 @@ static int cs35l56_hda_vol_get(struct snd_kcontrol *kcontrol,
323323static int cs35l56_hda_vol_put (struct snd_kcontrol * kcontrol ,
324324 struct snd_ctl_elem_value * ucontrol )
325325{
326- struct cs35l56_hda * cs35l56 = ( struct cs35l56_hda * ) kcontrol -> private_data ;
326+ struct cs35l56_hda * cs35l56 = snd_kcontrol_chip ( kcontrol ) ;
327327 long vol = ucontrol -> value .integer .value [0 ];
328328 unsigned int raw_vol ;
329329 bool changed ;
0 commit comments