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

ALSA: hda: intel-nhlt: Move structs out of #define block

As functions prototypes regerdless of CONFIG options as well as some
code depend on structures defined in sound/intel-nhlt.h header, move
them out of #define block. This allows to compile code depending on
mentioned header with "depends on ACPI || COMPILE_TEST" in Kconfig.

Fixes: 47a1886a610a ("ASoC: Intel: avs: Enable AVS driver only on x86 platforms")
Reported-by: kernel test robot <lkp@intel.com>
Suggested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20220426200539.894010-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Amadeusz Sławiński and committed by
Mark Brown
2d3694fd 5ab1679d

+2 -4
+2 -4
include/sound/intel-nhlt.h
··· 25 25 NHLT_DEVICE_INVALID 26 26 }; 27 27 28 - #if IS_ENABLED(CONFIG_ACPI) && IS_ENABLED(CONFIG_SND_INTEL_NHLT) 29 - 30 28 struct wav_fmt { 31 29 u16 fmt_tag; 32 30 u16 channels; ··· 124 126 NHLT_MIC_ARRAY_VENDOR_DEFINED = 0xf, 125 127 }; 126 128 129 + #if IS_ENABLED(CONFIG_ACPI) && IS_ENABLED(CONFIG_SND_INTEL_NHLT) 130 + 127 131 struct nhlt_acpi_table *intel_nhlt_init(struct device *dev); 128 132 129 133 void intel_nhlt_free(struct nhlt_acpi_table *addr); ··· 142 142 u8 num_ch, u32 rate, u8 dir, u8 dev_type); 143 143 144 144 #else 145 - 146 - struct nhlt_acpi_table; 147 145 148 146 static inline struct nhlt_acpi_table *intel_nhlt_init(struct device *dev) 149 147 {