From patchwork Mon May 26 19:15:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 4244651 X-Patchwork-Delegate: tiwai@suse.de 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9F3D19F333 for ; Mon, 26 May 2014 19:16:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CE5822013A for ; Mon, 26 May 2014 19:16:13 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 729F7200E5 for ; Mon, 26 May 2014 19:16:12 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 0104F26549F; Mon, 26 May 2014 21:16: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, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 0290826545A; Mon, 26 May 2014 21:16:00 +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 37A2426545F; Mon, 26 May 2014 21:15:59 +0200 (CEST) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.130]) by alsa0.perex.cz (Postfix) with ESMTP id 44A4E2652B9 for ; Mon, 26 May 2014 21:15:51 +0200 (CEST) Received: from wuerfel.localnet (HSI-KBW-134-3-133-35.hsi14.kabel-badenwuerttemberg.de [134.3.133.35]) by mrelayeu.kundenserver.de (node=mreue001) with ESMTP (Nemesis) id 0MDpjK-1X4ywe0w1O-00H9Qw; Mon, 26 May 2014 21:15:22 +0200 From: Arnd Bergmann To: Takashi Iwai Date: Mon, 26 May 2014 21:15:20 +0200 Message-ID: <4369871.VRtaiA22pI@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.11.0-18-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 X-Provags-ID: V02:K0:/jdRnocq1lJ2fjbhs2IPcaB+saoddhA9geyuXITfF++ /NxBKlHiu+BOF4YB7q3bbvJ0VamHXxhcWV29zQEsTGR36qTwxO 9PbGCIX1Q1bnEWfW9aeBPsRyUUE0rRmFV6Zvxz7c81i0UID8LF nCGR16UW5A6udlhFs4a661CkstezV34TJGXTXKSaIA/jftK2wN Y7HIVnvqbpDKZH7rv2Ftno/aAsJsUrK42xfzbyWFGfn7dnPg+H 8IW3L1VoGxfnnYfdyeiY8FarkaKLuo4Q3ZUSdPr08P8dN6GjkR kPeaVrqrJow1vQ8+K9saxbiAQtDep8V7H89kBERyXd/ww8WzsE tu1x2XD21iGbbleFuWOc= Cc: Dylan Reid , Stephen Warren , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH v2] ALSA: hda: fix tegra build 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 When CONFIG_PM is disabled, the CONFIG_SND_HDA_POWER_SAVE_DEFAULT symbol does not get defined, which causes a build error for the hda-tegra driver: hda/hda_tegra.c:80:25: error: 'CONFIG_SND_HDA_POWER_SAVE_DEFAULT' undeclared here (not in a function) static int power_save = CONFIG_SND_HDA_POWER_SAVE_DEFAULT; ^ /git/arm-soc/sound/pci/hda/hda_tegra.c:235:13: warning: 'hda_tegra_disable_clocks' defined but not used [-Wunused-function] static void hda_tegra_disable_clocks(struct hda_tegra *data) ^ This works around the problem by not referencing that macro when CONFIG_PM is disabled. Instead, we assume that it's disabled unconditionally and cannot be enabled at runtime. Signed-off-by: Arnd Bergmann Cc: Dylan Reid Cc: Stephen Warren Cc: Takashi Iwai --- Same patch, but this time with correct Signed-off-by line. diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c index 086fd06..a366ba9 100644 --- a/sound/pci/hda/hda_tegra.c +++ b/sound/pci/hda/hda_tegra.c @@ -77,10 +77,14 @@ struct hda_tegra { void __iomem *regs; }; +#ifdef CONFIG_PM static int power_save = CONFIG_SND_HDA_POWER_SAVE_DEFAULT; module_param(power_save, bint, 0644); MODULE_PARM_DESC(power_save, "Automatic power-saving timeout (in seconds, 0 = disable)."); +#else +static int power_save = 0; +#endif /* * DMA page allocation ops.