mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	ASoC: core: Fix check before defaulting to regmap
Check if the chip has provided a write operation (which is mandatory for I/O) rather than looking for control data as some of the MFDs use a global for this. Also skip the attempt if there's no regmap available by device in case things get confused by the attempt to default. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
This commit is contained in:
		
							parent
							
								
									9d40e5582c
								
							
						
					
					
						commit
						98d3088e53
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1096,7 +1096,7 @@ static int soc_probe_codec(struct snd_soc_card *card,
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	/* If the driver didn't set I/O up try regmap */
 | 
			
		||||
	if (!codec->control_data)
 | 
			
		||||
	if (!codec->write && dev_get_regmap(codec->dev, NULL))
 | 
			
		||||
		snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP);
 | 
			
		||||
 | 
			
		||||
	if (driver->controls)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue