mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	ASoC: core: lock client_mutex while removing link components
Removing link components results in topology unloading. So, acquire the client_mutex before removing components in soc_remove_link_components. This will prevent the lockdep warning seen when dai links are removed during topology removal. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
		
							parent
							
								
									4819d06292
								
							
						
					
					
						commit
						34ac3c3eb8
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -1005,12 +1005,14 @@ static void soc_remove_link_components(struct snd_soc_card *card,
 | 
			
		|||
	struct snd_soc_component *component;
 | 
			
		||||
	struct snd_soc_rtdcom_list *rtdcom;
 | 
			
		||||
 | 
			
		||||
	mutex_lock(&client_mutex);
 | 
			
		||||
	for_each_rtdcom(rtd, rtdcom) {
 | 
			
		||||
		component = rtdcom->component;
 | 
			
		||||
 | 
			
		||||
		if (component->driver->remove_order == order)
 | 
			
		||||
			soc_remove_component(component);
 | 
			
		||||
	}
 | 
			
		||||
	mutex_unlock(&client_mutex);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void soc_remove_dai_links(struct snd_soc_card *card)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue