From patchwork Tue May 27 07:39:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Nikula X-Patchwork-Id: 4246301 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C38D0BF90B for ; Tue, 27 May 2014 07:41:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E93F3202B8 for ; Tue, 27 May 2014 07:41:15 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 94C4B20272 for ; Tue, 27 May 2014 07:41:14 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 5C4B626557F; Tue, 27 May 2014 09:41:13 +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, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 62004265553; Tue, 27 May 2014 09:41:02 +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 96A79265556; Tue, 27 May 2014 09:41:01 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by alsa0.perex.cz (Postfix) with ESMTP id 18A35265553 for ; Tue, 27 May 2014 09:40:52 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 27 May 2014 00:40:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.98,917,1392192000"; d="scan'208";a="518176942" Received: from mylly.fi.intel.com (HELO mylly.fi.intel.com.) ([10.237.72.55]) by orsmga001.jf.intel.com with ESMTP; 27 May 2014 00:40:32 -0700 From: Jarkko Nikula To: alsa-devel@alsa-project.org Date: Tue, 27 May 2014 10:39:57 +0300 Message-Id: <1401176397-17591-1-git-send-email-jarkko.nikula@linux.intel.com> X-Mailer: git-send-email 2.0.0.rc2 Cc: kbuild test robot , Mark Brown , Jarkko Nikula , Liam Girdwood Subject: [alsa-devel] [PATCH] ASoC: jack: Fix multiple definition of `snd_soc_jack_add_gpiods' 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Commit f025d3b9c64e ("ASoC: jack: Add support for GPIO descriptor defined jack pins") caused build error when CONFIG_GPIOLIB is not set: sound/include/sound/soc.h:470: multiple definition of `snd_soc_jack_add_gpiods' sound/soc/soc-core.o:sound/include/sound/soc.h:470: first defined here make[2]: *** [sound/soc/snd-soc-core.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [sound/soc] Error 2 make: *** [sound] Error 2 Fix this by marking snd_soc_jack_add_gpiods() as static inline in soc.h. Reported-by: kbuild test robot Signed-off-by: Jarkko Nikula --- include/sound/soc.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index 98dca42487bc..15ee2f71b92e 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -464,9 +464,10 @@ static inline int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count, return 0; } -int snd_soc_jack_add_gpiods(struct device *gpiod_dev, - struct snd_soc_jack *jack, - int count, struct snd_soc_jack_gpio *gpios) +static inline int snd_soc_jack_add_gpiods(struct device *gpiod_dev, + struct snd_soc_jack *jack, + int count, + struct snd_soc_jack_gpio *gpios) { return 0; }