Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: SOF: imx: add header file for ops

Sparse (make C=2) complains about undeclared variables. Fix by adding
a real prototype instead of 'extern' in sof-of-dev.c

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20210928072807.27838-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Pierre-Louis Bossart and committed by
Mark Brown
3e5cdded a1ce6e43

+13 -4
+10
sound/soc/sof/imx/imx-ops.h
··· 1 + /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ 2 + 3 + #ifndef __IMX_OPS_H__ 4 + #define __IMX_OPS_H__ 5 + 6 + extern struct snd_sof_dsp_ops sof_imx8_ops; 7 + extern struct snd_sof_dsp_ops sof_imx8x_ops; 8 + extern struct snd_sof_dsp_ops sof_imx8m_ops; 9 + 10 + #endif
+1
sound/soc/sof/imx/imx8.c
··· 22 22 #include <dt-bindings/firmware/imx/rsrc.h> 23 23 #include "../ops.h" 24 24 #include "imx-common.h" 25 + #include "imx-ops.h" 25 26 26 27 /* DSP memories */ 27 28 #define IRAM_OFFSET 0x10000
+1
sound/soc/sof/imx/imx8m.c
··· 18 18 19 19 #include "../ops.h" 20 20 #include "imx-common.h" 21 + #include "imx-ops.h" 21 22 22 23 #define MBOX_OFFSET 0x800000 23 24 #define MBOX_SIZE 0x1000
+1 -4
sound/soc/sof/sof-of-dev.c
··· 11 11 #include <sound/sof.h> 12 12 13 13 #include "ops.h" 14 - 15 - extern struct snd_sof_dsp_ops sof_imx8_ops; 16 - extern struct snd_sof_dsp_ops sof_imx8x_ops; 17 - extern struct snd_sof_dsp_ops sof_imx8m_ops; 14 + #include "imx/imx-ops.h" 18 15 19 16 /* platform specific devices */ 20 17 #if IS_ENABLED(CONFIG_SND_SOC_SOF_IMX8)