diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c index a6f843784f2f..e2a0c16397cd 100644 --- a/drivers/staging/greybus/audio_codec.c +++ b/drivers/staging/greybus/audio_codec.c @@ -333,10 +333,11 @@ static int gbaudio_module_disable_rx(struct gbaudio_codec_info *codec, } int gbaudio_module_update(struct gbaudio_codec_info *codec, - const char *w_name, - struct gbaudio_module_info *module, int enable) + struct snd_soc_dapm_widget *w, + struct gbaudio_module_info *module, int enable) { int stream, ret = 0; + const char *w_name = w->name; dev_dbg(module->dev, "%s:Module update %s sequence\n", w_name, enable ? "Enable":"Disable"); diff --git a/drivers/staging/greybus/audio_codec.h b/drivers/staging/greybus/audio_codec.h index 1646b2ca0f0d..c5a8808108db 100644 --- a/drivers/staging/greybus/audio_codec.h +++ b/drivers/staging/greybus/audio_codec.h @@ -206,9 +206,9 @@ int gbaudio_tplg_parse_data(struct gbaudio_module_info *module, void gbaudio_tplg_release(struct gbaudio_module_info *module); int gbaudio_module_update(struct gbaudio_codec_info *codec, - const char *w_name, - struct gbaudio_module_info *module, - int enable); + struct snd_soc_dapm_widget *w, + struct gbaudio_module_info *module, + int enable); int gbaudio_register_module(struct gbaudio_module_info *module); void gbaudio_unregister_module(struct gbaudio_module_info *module); diff --git a/drivers/staging/greybus/audio_topology.c b/drivers/staging/greybus/audio_topology.c index 3c7c786d3b03..937529653cd3 100644 --- a/drivers/staging/greybus/audio_topology.c +++ b/drivers/staging/greybus/audio_topology.c @@ -960,14 +960,12 @@ static int gbaudio_widget_event(struct snd_soc_dapm_widget *w, case SND_SOC_DAPM_PRE_PMU: ret = gb_audio_gb_enable_widget(module->mgmt_connection, wid); if (!ret) - ret = gbaudio_module_update(gbcodec, w->name, module, - 1); + ret = gbaudio_module_update(gbcodec, w, module, 1); break; case SND_SOC_DAPM_POST_PMD: ret = gb_audio_gb_disable_widget(module->mgmt_connection, wid); if (!ret) - ret = gbaudio_module_update(gbcodec, w->name, module, - 0); + ret = gbaudio_module_update(gbcodec, w, module, 0); break; } if (ret)