On Wed, Jun 10, 2020 at 08:45:35PM +0300, Dan Carpenter wrote: > On Wed, Jun 10, 2020 at 10:58:28PM +0530, Vaibhav Agarwal wrote: > > @@ -437,11 +433,12 @@ static int gbcodec_mixer_dapm_ctl_put(struct snd_kcontrol *kcontrol, > > struct gbaudio_module_info *module; > > struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol); > > struct snd_soc_dapm_widget *widget = wlist->widgets[0]; > > - struct snd_soc_codec *codec = widget->codec; > > - struct gbaudio_codec_info *gb = snd_soc_codec_get_drvdata(codec); > > + struct device *codec_dev = widget->dapm->dev; > > + struct gbaudio_codec_info *gb = dev_get_drvdata(codec_dev); > > + struct snd_soc_dapm_update *update = NULL; > ^^^^^^^^^^^^^ > > > struct gb_bundle *bundle; > > > > - dev_dbg(codec->dev, "Entered %s:%s\n", __func__, kcontrol->id.name); > > + dev_dbg(codec_dev, "Entered %s:%s\n", __func__, kcontrol->id.name); > > module = find_gb_module(gb, kcontrol->id.name); > > if (!module) > > return -EINVAL; > > @@ -458,17 +455,13 @@ static int gbcodec_mixer_dapm_ctl_put(struct snd_kcontrol *kcontrol, > > max = le32_to_cpu(info->value.integer.max); > > mask = (1 << fls(max)) - 1; > > val = ucontrol->value.integer.value[0] & mask; > > - connect = !!val; > > > > /* update ucontrol */ > > if (gbvalue.value.integer_value[0] != val) { > > for (wi = 0; wi < wlist->num_widgets; wi++) { > > widget = wlist->widgets[wi]; > > - > > - widget->value = val; > > - widget->dapm->update = NULL; > > - snd_soc_dapm_mixer_update_power(widget, kcontrol, > > - connect); > > + snd_soc_dapm_mixer_update_power(widget->dapm, kcontrol, > > + val, update); > ^^^^^^ > Always NULL. Just delete the update variable. Aah, my bad! Thanks Dan for sharing your comments. I'll fix this while sharing next patchset. -- Regards, Vaibhav > > regards, > dan carpenter > > _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel