summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2019-05-07 18:32:36 +0200
committerMark Brown <broonie@kernel.org>2019-05-08 08:42:00 +0200
commitce38a75089f70f6380fc63a5478a7659b4eb3f47 (patch)
tree2b937b5e306b5e137b8c6ddc6626cb9d27166c25 /sound/soc
parentASoC: SOF: xtensa: fix undefined references (diff)
downloadlinux-ce38a75089f70f6380fc63a5478a7659b4eb3f47.tar.xz
linux-ce38a75089f70f6380fc63a5478a7659b4eb3f47.zip
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>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/sof/core.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/sof/core.c b/sound/soc/sof/core.c
index 39cbd84ff9c8..5ddbfa8f1a28 100644
--- a/sound/soc/sof/core.c
+++ b/sound/soc/sof/core.c
@@ -265,11 +265,10 @@ static int sof_machine_check(struct snd_sof_dev *sdev)
if (plat_data->machine)
return 0;
- if (!IS_ENABLED(CONFIG_SND_SOC_SOF_NOCODEC)) {
- dev_err(sdev->dev, "error: no matching ASoC machine driver found - aborting probe\n");
- return -ENODEV;
- }
-
+#if !IS_ENABLED(CONFIG_SND_SOC_SOF_NOCODEC)
+ dev_err(sdev->dev, "error: no matching ASoC machine driver found - aborting probe\n");
+ return -ENODEV;
+#else
/* fallback to nocodec mode */
dev_warn(sdev->dev, "No ASoC machine driver found - using nocodec\n");
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;
return 0;
+#endif
}
static int sof_probe_continue(struct snd_sof_dev *sdev)