lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue, 29 Mar 2016 09:45:00 -0700
From:	Randy Dunlap <rdunlap@...radead.org>
To:	moderated for non-subscribers <alsa-devel@...a-project.org>,
	LKML <linux-kernel@...r.kernel.org>
Cc:	Borislav Petkov <bp@...en8.de>, Takashi Iwai <tiwai@...e.de>,
	Mark Brown <broonie@...nel.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	"Subhransu S. Prusty" <subhransu.s.prusty@...el.com>,
	Jie Yang <yang.jie@...ux.intel.com>
Subject: [PATCH] ASoC: intel: add function stub when ACPI is not enabled

From: Randy Dunlap <rdunlap@...radead.org>

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@...en8.de>
Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
Cc: Subhransu S. Prusty <subhransu.s.prusty@...el.com>
Cc:	Jie Yang <yang.jie@...ux.intel.com>
Cc:	alsa-devel@...a-project.org
---
 sound/soc/intel/common/sst-acpi.h |    9 +++++++++
 1 file changed, 9 insertions(+)

--- linux-next-20160308.orig/sound/soc/intel/common/sst-acpi.h
+++ linux-next-20160308/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);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ