From patchwork Tue Mar 29 16:45:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 8692681 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7BA44C0553 for ; Wed, 30 Mar 2016 03:09:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AA642202FF for ; Wed, 30 Mar 2016 03:09:14 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 010A7202FE for ; Wed, 30 Mar 2016 03:09:12 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 1307A265B94; Wed, 30 Mar 2016 05:09:11 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id CC6E8265A1E; Tue, 29 Mar 2016 21:50:13 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 2C69526668E; Tue, 29 Mar 2016 21:50:13 +0200 (CEST) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by alsa0.perex.cz (Postfix) with ESMTP id 65B3C265A1E for ; Tue, 29 Mar 2016 18:45:06 +0200 (CEST) Received: from static-50-53-43-78.bvtn.or.frontiernet.net ([50.53.43.78] helo=[192.168.1.15]) by casper.infradead.org with esmtpsa (Exim 4.85 #2 (Red Hat Linux)) id 1akwlL-0000Tl-67; Tue, 29 Mar 2016 16:45:03 +0000 To: moderated for non-subscribers , LKML From: Randy Dunlap 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 Cc: Takashi Iwai , Jie Yang , Liam Girdwood , Mark Brown , Borislav Petkov , "Subhransu S. Prusty" Subject: [alsa-devel] [PATCH] ASoC: intel: add function stub when ACPI is not enabled X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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);