From patchwork Mon May 26 16:14:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 4244161 X-Patchwork-Delegate: tiwai@suse.de 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 192AFBF90B for ; Mon, 26 May 2014 16:22:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4AE0C20254 for ; Mon, 26 May 2014 16:22:02 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 1860F2021F for ; Mon, 26 May 2014 16:22:01 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 5258F265057; Mon, 26 May 2014 18:21:59 +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, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 213422654BE; Mon, 26 May 2014 18:18:40 +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 259012654BF; Mon, 26 May 2014 18:18:39 +0200 (CEST) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.10]) by alsa0.perex.cz (Postfix) with ESMTP id 14365265351 for ; Mon, 26 May 2014 18:14:50 +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=mreue103) with ESMTP (Nemesis) id 0LdtKd-1WNqKk3Jh5-00j2Og; Mon, 26 May 2014 18:14:21 +0200 From: Arnd Bergmann To: Takashi Iwai , Dylan Reid , Stephen Warren , Jaroslav Kysela , alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org Date: Mon, 26 May 2014 18:14:21 +0200 Message-ID: <4769804.MRZYg8zfIB@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:g2wQbGpZ8vPLOCo6o/or12pkhX9JwF6tZG9D0HAduJO Rb5wFEXapsicyZ5ClFl93iX7LIQxEwN4q+4ykpJFF45i46Vx5b 9+hZT16F0AQDHnTOtCiY3tXa78sPEKbtLL7FiMEYS94hJ5jBIt uaVWBvUkfMmb0olMRTlkfryYKkUKb+icoBBLGASfU3JwGwfu5q 8s/Exbm8vioGPaILM5DjnNomWBlxNBZpGDL41J94ZdFxt4LRVR SJUNPe8dyxx3onVQhXl6yjJcknYJkceRUMOxYVVwMfv8hbNdNy Bv27iPkSfAImBCc1+vLeVKM84tF4N2WAfgLuAgG/ejpt0ct5Hf WyBMGrm/TBEqe22yOO5k= Subject: [alsa-devel] [PATCH] 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: Dylan Reid Reviewed-by: Stephen Warren Signed-off-by: Takashi Iwai 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.