summaryrefslogtreecommitdiffstats
path: root/sound/soc/sof/sof-of-dev.h
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>2023-11-29 13:53:15 +0100
committerMark Brown <broonie@kernel.org>2023-11-29 14:25:04 +0100
commit014fdeb0d747304111cfecf93df4407c1a0c80db (patch)
tree53d568276c1e28e8ca302b7da7b23447b07b6f23 /sound/soc/sof/sof-of-dev.h
parentASoC: SOF: icp3-dtrace: Fix wrong kfree() usage (diff)
downloadlinux-014fdeb0d747304111cfecf93df4407c1a0c80db.tar.xz
linux-014fdeb0d747304111cfecf93df4407c1a0c80db.zip
ASoC: SOF: Move sof_of_machine_select() to sof-of-dev.c from sof-audio.c
Move the sof_of_machine_select() function to sof-of-dev.c file and provide an inline stub in case of non OF builds. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20231129125327.23708-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to '')
-rw-r--r--sound/soc/sof/sof-of-dev.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/sof/sof-of-dev.h b/sound/soc/sof/sof-of-dev.h
index b6cc70595f3b..547e358a37e3 100644
--- a/sound/soc/sof/sof-of-dev.h
+++ b/sound/soc/sof/sof-of-dev.h
@@ -16,6 +16,15 @@ struct snd_sof_of_mach {
const char *sof_tplg_filename;
};
+#if IS_ENABLED(CONFIG_SND_SOC_SOF_OF_DEV)
+struct snd_sof_of_mach *sof_of_machine_select(struct snd_sof_dev *sdev);
+#else
+static inline struct snd_sof_of_mach *sof_of_machine_select(struct snd_sof_dev *sdev)
+{
+ return NULL;
+}
+#endif
+
extern const struct dev_pm_ops sof_of_pm;
int sof_of_probe(struct platform_device *pdev);