Commit 430791dd authored by Amadeusz Sławiński's avatar Amadeusz Sławiński Committed by Mark Brown

ASoC: topology: Rename soc_tplg_init_kcontrol() function

Other functions used for callbacks are named after function they call,
however function calling control_load seems to be an exception. Rename
it to soc_tplg_control_load().
Signed-off-by: default avatarAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: default avatarCezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220401120200.4047867-7-amadeuszx.slawinski@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 34b31045
...@@ -618,7 +618,7 @@ int snd_soc_tplg_widget_bind_event(struct snd_soc_dapm_widget *w, ...@@ -618,7 +618,7 @@ int snd_soc_tplg_widget_bind_event(struct snd_soc_dapm_widget *w,
EXPORT_SYMBOL_GPL(snd_soc_tplg_widget_bind_event); EXPORT_SYMBOL_GPL(snd_soc_tplg_widget_bind_event);
/* optionally pass new dynamic kcontrol to component driver. */ /* optionally pass new dynamic kcontrol to component driver. */
static int soc_tplg_init_kcontrol(struct soc_tplg *tplg, static int soc_tplg_control_load(struct soc_tplg *tplg,
struct snd_kcontrol_new *k, struct snd_soc_tplg_ctl_hdr *hdr) struct snd_kcontrol_new *k, struct snd_soc_tplg_ctl_hdr *hdr)
{ {
if (tplg->ops && tplg->ops->control_load) if (tplg->ops && tplg->ops->control_load)
...@@ -725,7 +725,7 @@ static int soc_tplg_dbytes_create(struct soc_tplg *tplg, size_t size) ...@@ -725,7 +725,7 @@ static int soc_tplg_dbytes_create(struct soc_tplg *tplg, size_t size)
} }
/* pass control to driver for optional further init */ /* pass control to driver for optional further init */
ret = soc_tplg_init_kcontrol(tplg, &kc, (struct snd_soc_tplg_ctl_hdr *)be); ret = soc_tplg_control_load(tplg, &kc, (struct snd_soc_tplg_ctl_hdr *)be);
if (ret < 0) { if (ret < 0) {
dev_err(tplg->dev, "ASoC: failed to init %s\n", be->hdr.name); dev_err(tplg->dev, "ASoC: failed to init %s\n", be->hdr.name);
goto err; goto err;
...@@ -809,7 +809,7 @@ static int soc_tplg_dmixer_create(struct soc_tplg *tplg, size_t size) ...@@ -809,7 +809,7 @@ static int soc_tplg_dmixer_create(struct soc_tplg *tplg, size_t size)
} }
/* pass control to driver for optional further init */ /* pass control to driver for optional further init */
ret = soc_tplg_init_kcontrol(tplg, &kc, (struct snd_soc_tplg_ctl_hdr *)mc); ret = soc_tplg_control_load(tplg, &kc, (struct snd_soc_tplg_ctl_hdr *)mc);
if (ret < 0) { if (ret < 0) {
dev_err(tplg->dev, "ASoC: failed to init %s\n", mc->hdr.name); dev_err(tplg->dev, "ASoC: failed to init %s\n", mc->hdr.name);
goto err; goto err;
...@@ -977,7 +977,7 @@ static int soc_tplg_denum_create(struct soc_tplg *tplg, size_t size) ...@@ -977,7 +977,7 @@ static int soc_tplg_denum_create(struct soc_tplg *tplg, size_t size)
} }
/* pass control to driver for optional further init */ /* pass control to driver for optional further init */
ret = soc_tplg_init_kcontrol(tplg, &kc, (struct snd_soc_tplg_ctl_hdr *)ec); ret = soc_tplg_control_load(tplg, &kc, (struct snd_soc_tplg_ctl_hdr *)ec);
if (ret < 0) { if (ret < 0) {
dev_err(tplg->dev, "ASoC: failed to init %s\n", ec->hdr.name); dev_err(tplg->dev, "ASoC: failed to init %s\n", ec->hdr.name);
goto err; goto err;
...@@ -1193,8 +1193,7 @@ static int soc_tplg_dapm_widget_dmixer_create(struct soc_tplg *tplg, struct snd_ ...@@ -1193,8 +1193,7 @@ static int soc_tplg_dapm_widget_dmixer_create(struct soc_tplg *tplg, struct snd_
} }
/* pass control to driver for optional further init */ /* pass control to driver for optional further init */
err = soc_tplg_init_kcontrol(tplg, kc, err = soc_tplg_control_load(tplg, kc, (struct snd_soc_tplg_ctl_hdr *)mc);
(struct snd_soc_tplg_ctl_hdr *)mc);
if (err < 0) { if (err < 0) {
dev_err(tplg->dev, "ASoC: failed to init %s\n", dev_err(tplg->dev, "ASoC: failed to init %s\n",
mc->hdr.name); mc->hdr.name);
...@@ -1278,8 +1277,7 @@ static int soc_tplg_dapm_widget_denum_create(struct soc_tplg *tplg, struct snd_k ...@@ -1278,8 +1277,7 @@ static int soc_tplg_dapm_widget_denum_create(struct soc_tplg *tplg, struct snd_k
} }
/* pass control to driver for optional further init */ /* pass control to driver for optional further init */
err = soc_tplg_init_kcontrol(tplg, kc, err = soc_tplg_control_load(tplg, kc, (struct snd_soc_tplg_ctl_hdr *)ec);
(struct snd_soc_tplg_ctl_hdr *)ec);
if (err < 0) { if (err < 0) {
dev_err(tplg->dev, "ASoC: failed to init %s\n", dev_err(tplg->dev, "ASoC: failed to init %s\n",
ec->hdr.name); ec->hdr.name);
...@@ -1331,8 +1329,7 @@ static int soc_tplg_dapm_widget_dbytes_create(struct soc_tplg *tplg, struct snd_ ...@@ -1331,8 +1329,7 @@ static int soc_tplg_dapm_widget_dbytes_create(struct soc_tplg *tplg, struct snd_
} }
/* pass control to driver for optional further init */ /* pass control to driver for optional further init */
err = soc_tplg_init_kcontrol(tplg, kc, err = soc_tplg_control_load(tplg, kc, (struct snd_soc_tplg_ctl_hdr *)be);
(struct snd_soc_tplg_ctl_hdr *)be);
if (err < 0) { if (err < 0) {
dev_err(tplg->dev, "ASoC: failed to init %s\n", dev_err(tplg->dev, "ASoC: failed to init %s\n",
be->hdr.name); be->hdr.name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment