Commit 656ca9d3 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Mark Brown

ASoC: dapm: Remove unused long_name field from snd_soc_dapm_path struct

Since commit 85762e71 ("ASoC: dapm: Implement mixer control sharing") the
long_name field of the snd_soc_dapm_path struct is unused. All of the name
handling now happens entirely in dapm_create_or_share_mixmux_kcontrol(). So we
can remove the long_name field from the snd_soc_dapm_path struct.
Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 8872293f
...@@ -478,7 +478,6 @@ struct snd_soc_dapm_route { ...@@ -478,7 +478,6 @@ struct snd_soc_dapm_route {
/* dapm audio path between two widgets */ /* dapm audio path between two widgets */
struct snd_soc_dapm_path { struct snd_soc_dapm_path {
const char *name; const char *name;
const char *long_name;
/* source (input) and sink (output) widgets */ /* source (input) and sink (output) widgets */
struct snd_soc_dapm_widget *source; struct snd_soc_dapm_widget *source;
......
...@@ -621,17 +621,15 @@ static int dapm_create_or_share_mixmux_kcontrol(struct snd_soc_dapm_widget *w, ...@@ -621,17 +621,15 @@ static int dapm_create_or_share_mixmux_kcontrol(struct snd_soc_dapm_widget *w,
kcontrol = snd_soc_cnew(&w->kcontrol_news[kci], wlist, name, kcontrol = snd_soc_cnew(&w->kcontrol_news[kci], wlist, name,
prefix); prefix);
kcontrol->private_free = dapm_kcontrol_free; kcontrol->private_free = dapm_kcontrol_free;
kfree(long_name);
ret = snd_ctl_add(card, kcontrol); ret = snd_ctl_add(card, kcontrol);
if (ret < 0) { if (ret < 0) {
dev_err(dapm->dev, dev_err(dapm->dev,
"ASoC: failed to add widget %s dapm kcontrol %s: %d\n", "ASoC: failed to add widget %s dapm kcontrol %s: %d\n",
w->name, name, ret); w->name, name, ret);
kfree(wlist); kfree(wlist);
kfree(long_name);
return ret; return ret;
} }
path->long_name = long_name;
} }
kcontrol->private_data = wlist; kcontrol->private_data = wlist;
...@@ -2110,7 +2108,6 @@ static void dapm_free_path(struct snd_soc_dapm_path *path) ...@@ -2110,7 +2108,6 @@ static void dapm_free_path(struct snd_soc_dapm_path *path)
list_del(&path->list_sink); list_del(&path->list_sink);
list_del(&path->list_source); list_del(&path->list_source);
list_del(&path->list); list_del(&path->list);
kfree(path->long_name);
kfree(path); kfree(path);
} }
......
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