Re: [PATCH 12/21] ASoC: soc-core: use snd_soc_lookup_component() at snd_soc_unregister_component()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux