From patchwork Tue Sep 20 08:59:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 9341329 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4F59D6077A for ; Tue, 20 Sep 2016 08:52:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4152E29D5C for ; Tue, 20 Sep 2016 08:52:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3549529D5E; Tue, 20 Sep 2016 08:52:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 076B029D5C for ; Tue, 20 Sep 2016 08:52:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753842AbcITIwE (ORCPT ); Tue, 20 Sep 2016 04:52:04 -0400 Received: from mga05.intel.com ([192.55.52.43]:27930 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754079AbcITIwE (ORCPT ); Tue, 20 Sep 2016 04:52:04 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP; 20 Sep 2016 01:52:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,366,1470726000"; d="scan'208";a="1059392083" Received: from vkoul-udesk7.iind.intel.com ([10.223.84.143]) by fmsmga002.fm.intel.com with ESMTP; 20 Sep 2016 01:52:00 -0700 From: Vinod Koul To: dmaengine@vger.kernel.org Cc: Arnd Bergmann , Vinod Koul , Jon Hunter Subject: [PATCH v2 26/30] dmaengine: tegra-adma: fix unused-function warnings Date: Tue, 20 Sep 2016 14:29:16 +0530 Message-Id: <1474361960-12434-27-git-send-email-vinod.koul@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1474361960-12434-1-git-send-email-vinod.koul@intel.com> References: <1474361960-12434-1-git-send-email-vinod.koul@intel.com> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP when CONFIG_PM is not defined, the compiler warns CC drivers/dma/tegra210-adma.o drivers/dma/tegra210-adma.c:635:12: warning: 'tegra_adma_runtime_suspend' defined but not used [-Wunused-function] static int tegra_adma_runtime_suspend(struct device *dev) ^ drivers/dma/tegra210-adma.c:644:12: warning: 'tegra_adma_runtime_resume' defined but not used [-Wunused-function] static int tegra_adma_runtime_resume(struct device *dev) ^ Although driver uses SET_RUNTIME_PM_OPS but doesn't add protection for these symbols causing warning when CONFIG_PM is not defined, so add CONFIG_PM around these symbols. Cc: Jon Hunter Signed-off-by: Vinod Koul --- drivers/dma/tegra210-adma.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/dma/tegra210-adma.c b/drivers/dma/tegra210-adma.c index c4b121c4559d..e8ee6f95ddb2 100644 --- a/drivers/dma/tegra210-adma.c +++ b/drivers/dma/tegra210-adma.c @@ -632,6 +632,7 @@ static struct dma_chan *tegra_dma_of_xlate(struct of_phandle_args *dma_spec, return chan; } +#ifdef CONFIG_PM static int tegra_adma_runtime_suspend(struct device *dev) { struct tegra_adma *tdma = dev_get_drvdata(dev); @@ -654,6 +655,7 @@ static int tegra_adma_runtime_resume(struct device *dev) return 0; } +#endif static const struct tegra_adma_chip_data tegra210_chip_data = { .nr_channels = 22,