Commit 33ae6ae2 authored by Amadeusz Sławiński's avatar Amadeusz Sławiński Committed by Mark Brown

ASoC: topology: Reduce number of dereferences when accessing dobj

We already have passed dobj, there is no reason to access it through
containing structs.
Signed-off-by: default avatarAmadeusz Sławiński <amadeuszx.slawinski@intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 53b6d0ad
......@@ -382,10 +382,10 @@ static void remove_mixer(struct snd_soc_component *comp,
if (dobj->ops && dobj->ops->control_unload)
dobj->ops->control_unload(comp, dobj);
if (sm->dobj.control.kcontrol->tlv.p)
p = sm->dobj.control.kcontrol->tlv.p;
snd_ctl_remove(card, sm->dobj.control.kcontrol);
list_del(&sm->dobj.list);
if (dobj->control.kcontrol->tlv.p)
p = dobj->control.kcontrol->tlv.p;
snd_ctl_remove(card, dobj->control.kcontrol);
list_del(&dobj->list);
kfree(sm);
kfree(p);
}
......@@ -404,12 +404,12 @@ static void remove_enum(struct snd_soc_component *comp,
if (dobj->ops && dobj->ops->control_unload)
dobj->ops->control_unload(comp, dobj);
snd_ctl_remove(card, se->dobj.control.kcontrol);
list_del(&se->dobj.list);
snd_ctl_remove(card, dobj->control.kcontrol);
list_del(&dobj->list);
kfree(se->dobj.control.dvalues);
kfree(dobj->control.dvalues);
for (i = 0; i < se->items; i++)
kfree(se->dobj.control.dtexts[i]);
kfree(dobj->control.dtexts[i]);
kfree(se);
}
......@@ -427,8 +427,8 @@ static void remove_bytes(struct snd_soc_component *comp,
if (dobj->ops && dobj->ops->control_unload)
dobj->ops->control_unload(comp, dobj);
snd_ctl_remove(card, sb->dobj.control.kcontrol);
list_del(&sb->dobj.list);
snd_ctl_remove(card, dobj->control.kcontrol);
list_del(&dobj->list);
kfree(sb);
}
......@@ -464,9 +464,9 @@ static void remove_widget(struct snd_soc_component *comp,
snd_ctl_remove(card, kcontrol);
kfree(se->dobj.control.dvalues);
kfree(dobj->control.dvalues);
for (j = 0; j < se->items; j++)
kfree(se->dobj.control.dtexts[j]);
kfree(dobj->control.dtexts[j]);
kfree(se);
kfree(w->kcontrol_news[i].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