From patchwork Thu Oct 2 07:27:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 5016571 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 B43B99F348 for ; Thu, 2 Oct 2014 07:27:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D9F6B20270 for ; Thu, 2 Oct 2014 07:27:28 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id AC3972021A for ; Thu, 2 Oct 2014 07:27:27 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 441CD26051E; Thu, 2 Oct 2014 09:27:26 +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.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id ED74E26051F; Thu, 2 Oct 2014 09:27:15 +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 16658260523; Thu, 2 Oct 2014 09:27:13 +0200 (CEST) Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by alsa0.perex.cz (Postfix) with ESMTP id 1995D26051E for ; Thu, 2 Oct 2014 09:27:05 +0200 (CEST) Received: by mail-wi0-f170.google.com with SMTP id hi2so638306wib.5 for ; Thu, 02 Oct 2014 00:27:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=/1fCYhf7DnuzWC/sz35CWKVscI7auz14xu+8zva7GSo=; b=pwh7c+wzYp9MPFoj+wIp4ZPy9V/uFSQdMn1YDvBuSkslXoZSlEoE2R6xcNmJkK+HnL 7X2Xuyg5z+n4GfD59bi7neqEg68CIRiwD2R6zJTTUjIEN+Wugp3bAUUQA+KCaG+NBJ3X CKGeP9iTMKAUZpKYf1CSblXRe2Ey2eOLvog3lrcEgWMuk8I9iZ/EscAG//nlreTQvlqg om7VzCq39tNpJtDXmLm48SmwRKf0vsfPAgF6YmnrqCVBkWgMl+aSG9i8Z9vQfKe5lsH7 2nyWDiifYNCuhhTYw8nnUa2UoNFewOY7XEi2SMu3NwGkA8DAZMDSRR2MgMa2dGzEku/e ofqw== X-Received: by 10.194.174.39 with SMTP id bp7mr11614294wjc.131.1412234824761; Thu, 02 Oct 2014 00:27:04 -0700 (PDT) Received: from localhost (port-49109.pppoe.wtnet.de. [46.59.192.110]) by mx.google.com with ESMTPSA id ul1sm3612868wjc.9.2014.10.02.00.27.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Oct 2014 00:27:04 -0700 (PDT) From: Thierry Reding To: Mark Brown Date: Thu, 2 Oct 2014 09:27:03 +0200 Message-Id: <1412234823-31433-1-git-send-email-thierry.reding@gmail.com> X-Mailer: git-send-email 2.1.0 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH] ASoC: rt286: Fix compilation warning for !PM 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 From: Thierry Reding The rt286_index_sync() function is only called in the resume path. If PM is disabled it becomes unused and shouldn't be built either. Signed-off-by: Thierry Reding --- sound/soc/codecs/rt286.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c index b86b426f159d..4aa555cbcca8 100644 --- a/sound/soc/codecs/rt286.c +++ b/sound/soc/codecs/rt286.c @@ -269,6 +269,7 @@ static int rt286_hw_read(void *context, unsigned int reg, unsigned int *value) return 0; } +#ifdef CONFIG_PM static void rt286_index_sync(struct snd_soc_codec *codec) { struct rt286_priv *rt286 = snd_soc_codec_get_drvdata(codec); @@ -279,6 +280,7 @@ static void rt286_index_sync(struct snd_soc_codec *codec) rt286->index_cache[i].def); } } +#endif static int rt286_support_power_controls[] = { RT286_DAC_OUT1,