mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	ASoC: soc-core: fix DMI handling
When DMI information is not present, trying to assign the card long
name results in the following warning.
WARNING KERN tegra-audio-graph-card sound: ASoC: no DMI vendor name!
The initial solution suggested was to test if the card device is an
ACPI one. This causes a regression visible to userspace on all Intel
platforms, with UCM unable to load card profiles based on DMI
information: the card devices are not necessarily ACPI ones, e.g. when
the parent creates platform devices on Intel devices.
To fix this problem, this patch exports the existing dmi_available
variable and tests it in the ASoC core.
Fixes: c014170408 ("ASoC: soc-core: Prevent warning if no DMI table is present")
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Jean Delvare <jdelvare@suse.de>
Link: https://lore.kernel.org/r/20210310193928.108850-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
			
			
This commit is contained in:
		
							parent
							
								
									64682e1b77
								
							
						
					
					
						commit
						c68fded79a
					
				
					 2 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -166,6 +166,7 @@ static int __init dmi_checksum(const u8 *buf, u8 len)
 | 
			
		|||
static const char *dmi_ident[DMI_STRING_MAX];
 | 
			
		||||
static LIST_HEAD(dmi_devices);
 | 
			
		||||
int dmi_available;
 | 
			
		||||
EXPORT_SYMBOL_GPL(dmi_available);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 *	Save a DMI string
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1574,7 +1574,7 @@ int snd_soc_set_dmi_name(struct snd_soc_card *card, const char *flavour)
 | 
			
		|||
	if (card->long_name)
 | 
			
		||||
		return 0; /* long name already set by driver or from DMI */
 | 
			
		||||
 | 
			
		||||
	if (!is_acpi_device_node(card->dev->fwnode))
 | 
			
		||||
	if (!dmi_available)
 | 
			
		||||
		return 0;
 | 
			
		||||
 | 
			
		||||
	/* make up dmi long name as: vendor-product-version-board */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue