From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932400AbcC2QpL (ORCPT ); Tue, 29 Mar 2016 12:45:11 -0400 Received: from casper.infradead.org ([85.118.1.10]:54048 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757708AbcC2QpH (ORCPT ); Tue, 29 Mar 2016 12:45:07 -0400 To: moderated for non-subscribers , LKML From: Randy Dunlap Subject: [PATCH] ASoC: intel: add function stub when ACPI is not enabled Cc: Borislav Petkov , Takashi Iwai , Mark Brown , Liam Girdwood , "Subhransu S. Prusty" , Jie Yang Message-ID: <56FAB10C.502@infradead.org> Date: Tue, 29 Mar 2016 09:45:00 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Randy Dunlap 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 Signed-off-by: Randy Dunlap Cc: Subhransu S. Prusty Cc: Jie Yang Cc: alsa-devel@alsa-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 +#include #include /* 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);