diff options
author | Randy Dunlap <rdunlap@infradead.org> | 2016-03-29 18:45:00 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-03-31 00:30:00 +0200 |
commit | f17131a93f43665a76ae1f6aebdbb3e41674137c (patch) | |
tree | 3a788f7cacbd8e35a74a55b6ac18e9467cdd4509 /sound/soc/intel/common | |
parent | Linux 4.6-rc1 (diff) | |
download | linux-f17131a93f43665a76ae1f6aebdbb3e41674137c.tar.xz linux-f17131a93f43665a76ae1f6aebdbb3e41674137c.zip |
ASoC: intel: add function stub when ACPI is not enabled
Add function stub for "sst_acpi_find_name_from_hid()"
when CONFIG_ACPI is not enabled so that the driver will build
successfully. This fixes the following build errors:
(loadable module)
ERROR: "sst_acpi_find_name_from_hid" [sound/soc/intel/boards/snd-soc-sst-bytcr-rt5640.ko] undefined!
(or built-in)
bytcr_rt5640.c:(.text+0x26fc52): undefined reference to `sst_acpi_find_name_from_hid'
Reported-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/common')
-rw-r--r-- | sound/soc/intel/common/sst-acpi.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/intel/common/sst-acpi.h b/sound/soc/intel/common/sst-acpi.h index 4dcfb7e5ed70..8398cb227ba9 100644 --- a/sound/soc/intel/common/sst-acpi.h +++ b/sound/soc/intel/common/sst-acpi.h @@ -12,10 +12,19 @@ * */ +#include <linux/kconfig.h> +#include <linux/stddef.h> #include <linux/acpi.h> /* translation fron HID to I2C name, needed for DAI codec_name */ +#if IS_ENABLED(CONFIG_ACPI) const char *sst_acpi_find_name_from_hid(const u8 hid[ACPI_ID_LEN]); +#else +inline const char *sst_acpi_find_name_from_hid(const u8 hid[ACPI_ID_LEN]) +{ + return NULL; +} +#endif /* acpi match */ struct sst_acpi_mach *sst_acpi_find_machine(struct sst_acpi_mach *machines); |