mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	ASoC: SOF: core: fix undefined nocodec reference
The existing code mistakenly uses IS_ENABLED in C code instead of as in conditional compilation, leading to the following error: ld: sound/soc/sof/core.o: in function `sof_machine_check': sound/soc/sof/core.c:279: undefined reference to `sof_nocodec_setup' Fix by using #if !IS_ENABLED() Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
		
							parent
							
								
									78989ff8ae
								
							
						
					
					
						commit
						ce38a75089
					
				
					 1 changed files with 5 additions and 5 deletions
				
			
		| 
						 | 
					@ -265,11 +265,10 @@ static int sof_machine_check(struct snd_sof_dev *sdev)
 | 
				
			||||||
	if (plat_data->machine)
 | 
						if (plat_data->machine)
 | 
				
			||||||
		return 0;
 | 
							return 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!IS_ENABLED(CONFIG_SND_SOC_SOF_NOCODEC)) {
 | 
					#if !IS_ENABLED(CONFIG_SND_SOC_SOF_NOCODEC)
 | 
				
			||||||
		dev_err(sdev->dev, "error: no matching ASoC machine driver found - aborting probe\n");
 | 
						dev_err(sdev->dev, "error: no matching ASoC machine driver found - aborting probe\n");
 | 
				
			||||||
		return -ENODEV;
 | 
						return -ENODEV;
 | 
				
			||||||
	}
 | 
					#else
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* fallback to nocodec mode */
 | 
						/* fallback to nocodec mode */
 | 
				
			||||||
	dev_warn(sdev->dev, "No ASoC machine driver found - using nocodec\n");
 | 
						dev_warn(sdev->dev, "No ASoC machine driver found - using nocodec\n");
 | 
				
			||||||
	machine = devm_kzalloc(sdev->dev, sizeof(*machine), GFP_KERNEL);
 | 
						machine = devm_kzalloc(sdev->dev, sizeof(*machine), GFP_KERNEL);
 | 
				
			||||||
| 
						 | 
					@ -284,6 +283,7 @@ static int sof_machine_check(struct snd_sof_dev *sdev)
 | 
				
			||||||
	plat_data->machine = machine;
 | 
						plat_data->machine = machine;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int sof_probe_continue(struct snd_sof_dev *sdev)
 | 
					static int sof_probe_continue(struct snd_sof_dev *sdev)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue