From patchwork Mon Jun 1 21:57:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 6524851 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A6C709F40A for ; Mon, 1 Jun 2015 21:58:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BBEA420495 for ; Mon, 1 Jun 2015 21:58:23 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 738DC20395 for ; Mon, 1 Jun 2015 21:58:22 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 4B492260430; Mon, 1 Jun 2015 23:58:19 +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 CF3C926041F; Mon, 1 Jun 2015 23:58:11 +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 5DB8B260422; Mon, 1 Jun 2015 23:58:10 +0200 (CEST) Received: from mail.mleia.com (li271-223.members.linode.com [178.79.152.223]) by alsa0.perex.cz (Postfix) with ESMTP id 73AE726040E for ; Mon, 1 Jun 2015 23:58:03 +0200 (CEST) Received: from mail.mleia.com (localhost [127.0.0.1]) by mail.mleia.com (Postfix) with ESMTP id BDBEC9AE25; Mon, 1 Jun 2015 23:00:48 +0100 (BST) From: Vladimir Zapolskiy To: Mark Brown , Liam Girdwood Date: Tue, 2 Jun 2015 00:57:53 +0300 Message-Id: <1433195873-29889-1-git-send-email-vz@mleia.com> X-Mailer: git-send-email 2.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-49551924 X-CRM114-CacheID: sfid-20150601_230048_799879_B6AC0DB6 X-CRM114-Status: UNSURE ( 9.77 ) X-CRM114-Notice: Please train this message. Cc: Takashi Iwai , alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH] ASoC: DAPM: fix snd_soc_dapm_new_control() implicit declaration 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 The change fixes the following compilation problem: sound/soc/soc-dapm.c: In function 'dapm_kcontrol_data_alloc': sound/soc/soc-dapm.c:388:4: error: implicit declaration of function 'snd_soc_dapm_new_control' [-Werror=implicit-function-declaration] data->widget = snd_soc_dapm_new_control(widget->dapm, ^ sound/soc/soc-dapm.c:387:17: warning: assignment makes pointer from integer without a cast [enabled by default] data->widget = snd_soc_dapm_new_control(widget->dapm, ^ sound/soc/soc-dapm.c: At top level: sound/soc/soc-dapm.c:3269:1: error: conflicting types for 'snd_soc_dapm_new_control' snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm, ^ In addition to the fix add static qualifier to snd_soc_dapm_new_control() function to silence checkpatch. Fixes: 02aa78abec ("ASoC: DAPM: Add APIs to create individual DAPM controls.") Signed-off-by: Vladimir Zapolskiy --- sound/soc/soc-dapm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 78d96e1..0d800ac 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -52,6 +52,11 @@ static int snd_soc_dapm_add_path(struct snd_soc_dapm_context *dapm, const char *control, int (*connected)(struct snd_soc_dapm_widget *source, struct snd_soc_dapm_widget *sink)); + +static struct snd_soc_dapm_widget * +snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm, + const struct snd_soc_dapm_widget *widget); + struct snd_soc_dapm_widget * snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm, const struct snd_soc_dapm_widget *widget); @@ -3265,7 +3270,7 @@ int snd_soc_dapm_put_pin_switch(struct snd_kcontrol *kcontrol, } EXPORT_SYMBOL_GPL(snd_soc_dapm_put_pin_switch); -struct snd_soc_dapm_widget * +static struct snd_soc_dapm_widget * snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm, const struct snd_soc_dapm_widget *widget) {