From patchwork Fri Jul 4 15:07:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 4481691 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 08026BEEAA for ; Fri, 4 Jul 2014 15:08:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3CA53202BE for ; Fri, 4 Jul 2014 15:08:13 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 1675320260 for ; Fri, 4 Jul 2014 15:08:12 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 74C4B2659F4; Fri, 4 Jul 2014 17:08:09 +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 4E08E2659C3; Fri, 4 Jul 2014 17:07:58 +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 916E02659C4; Fri, 4 Jul 2014 17:07:57 +0200 (CEST) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) by alsa0.perex.cz (Postfix) with ESMTP id 844292659B8 for ; Fri, 4 Jul 2014 17:07:49 +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=mreue004) with ESMTP (Nemesis) id 0LgL1E-1WFVF40Rsq-00njcJ; Fri, 04 Jul 2014 17:07:42 +0200 From: Arnd Bergmann To: broonie@kernel.org Date: Fri, 04 Jul 2014 17:07:41 +0200 Message-ID: <6778119.KeB0KTehn3@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:bkvALS3Gh6xX5ySG/I+oyfgpahZgkwITlnNveVz/NWe 6lSoENvCS2ERE9CU1I3QOkt6m7dUZUHvSIkMPlD3G1kcUZ7gXI NqGPOomodKqCTyzQU+MNxZLRkmQ5ZxGrKGfWw060464pkG/4cV Ac4LlpfxQKQ92IAwPWLvFsWuzCHZa/+iUBr6wRYyUI7iSIcgoF YNCtN1jynRc4PMzHUz47EpsiXP1TlXEi+APpC/25CYLBZZiS8/ fW1KWE5+L1PJ+J260fp2cp1KJzPH4k/0gzRj2bO8Tcn4u6Bsgd gvg/6UicptjYOZj5mtejfBW+bMkPYhVNBsmGarTUiOB9PdtpyI CaHeh8vS04zSArM28d5Q= Cc: Rongjun Ying , alsa-devel@alsa-project.org, Liam Girdwood , linux-arm-kernel@lists.infradead.org Subject: [alsa-devel] [PATCH] ASoC: sirf: provide pm-runtime functions when needed 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 The newly introduced sirf-usp driver defines sirf_usp_pcm_{suspend,resume} functions only when PM_RUNTIME is enabled, but also uses them when that is disabled and only PM_SLEEP is turned on, resulting in this error: ../sound/soc/sirf/sirf-usp.c: In function 'sirf_usp_pcm_suspend': ../sound/soc/sirf/sirf-usp.c:308:3: error: implicit declaration of function 'sirf_usp_pcm_runtime_suspend' [-Werror=implicit-function-declaration] sirf_usp_pcm_runtime_suspend(dev); ^ ../sound/soc/sirf/sirf-usp.c: In function 'sirf_usp_pcm_resume': ../sound/soc/sirf/sirf-usp.c:319:3: error: implicit declaration of function 'sirf_usp_pcm_runtime_resume' [-Werror=implicit-function-declaration] ret = sirf_usp_pcm_runtime_resume(dev); ^ cc1: some warnings being treated as errors To fix that, this patch changes the #ifdef to CONFIG_PM, which is enabled when at least one of PM_SLEEP or PM_RUNTIME are enabled. Signed-off-by: Arnd Bergmann diff --git a/sound/soc/sirf/sirf-usp.c b/sound/soc/sirf/sirf-usp.c index bdf6aae..9693bc2 100644 --- a/sound/soc/sirf/sirf-usp.c +++ b/sound/soc/sirf/sirf-usp.c @@ -282,7 +282,7 @@ static struct snd_soc_dai_driver sirf_usp_pcm_dai = { .ops = &sirf_usp_pcm_dai_ops, }; -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM static int sirf_usp_pcm_runtime_suspend(struct device *dev) { struct sirf_usp *usp = dev_get_drvdata(dev);