[alsa-devel] [PATCH 12/21] ASoC: soc-core: use snd_soc_lookup_component() at snd_soc_unregister_component()
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Fri Oct 11 03:38:28 CEST 2019
Hi Pierre-Louis
> > +void snd_soc_unregister_component(struct device *dev)
> > {
> > struct snd_soc_component *component;
> > - int found = 0;
> > -
> > - mutex_lock(&client_mutex);
> > - for_each_component(component) {
> > - if (dev != component->dev)
> > - continue;
> > + while (1) {
> > + component = snd_soc_lookup_component(dev, NULL);
> > + if (!component)
> > + break;
> > snd_soc_del_component(component);
>
> is it ok/intended that the mutex lock is now taken *after* looking up
> the component and after each iteration ?
Hmm.. maybe not good.
I will keep _unlocked() naming and mutex
Thank you for your help !!
Best regards
---
Kuninori Morimoto
More information about the Alsa-devel
mailing list