From patchwork Tue Sep 6 13:20:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9316833 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 780D460752 for ; Tue, 6 Sep 2016 13:20:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CBDC28D2A for ; Tue, 6 Sep 2016 13:20:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 611DB28D2B; Tue, 6 Sep 2016 13:20:24 +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=-4.5 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 82E3E28D2D for ; Tue, 6 Sep 2016 13:20:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934024AbcIFNUS (ORCPT ); Tue, 6 Sep 2016 09:20:18 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:64566 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932806AbcIFNUS (ORCPT ); Tue, 6 Sep 2016 09:20:18 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue104) with ESMTPA (Nemesis) id 0MJkO4-1bgAMT16GK-001BGf; Tue, 06 Sep 2016 15:19:57 +0200 From: Arnd Bergmann To: Vinod Koul Cc: Arnd Bergmann , Dan Williams , Tony Lindgren , Dave Jiang , Lars-Peter Clausen , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] dmaengine: cppi41: mark PM functions as __maybe_unused Date: Tue, 6 Sep 2016 15:20:05 +0200 Message-Id: <20160906132030.2014181-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:1LfcwOjEHuAmXC8q+sK/bqrboZEiweWLsvsrdlJ7rbrtt7w5Ssn Q0nlir1NG7MZyNsI4xfKZAUKe6jvcMV4aHrLpb+hbo7s7l69br6k96KUp6OswyV74+gSshg Yk4/3jD7czOQUHOWJ3a49M0Ww7Pc/le612V8R0JHGyCoHVkHgPGczulmrQ5sGopsJrSW1O+ reWxTfO+XmflXoCHkmJ5g== X-UI-Out-Filterresults: notjunk:1; V01:K0:pYwgZDSOXMc=:SbZOa+B/RyMEpRAtj3Tyzj lNdcyzoBeD4ik9/F2aR8dL8aRHiWxVcPze56HfksXeuCit2MJSEDYz1FtA3D9l8X2Hbi3il8b gs6a8KWD4Ju86qNdiLNSWt1/VQH2/kEmW8s/FoWk02RWQsvAWsfhwlWpbsFEwJvz/fJgY4xzV kVPaSb7qnQKDwSY+EOy7crJJM4tW9SYeQ3CaM4BL2/tVyloSYSSJyThTuPoFqbnXSJw9CTw9z xWP6pzwdPNAesQwuvF+zw+s+MNU3Ros0iHOMWxv1+axcb2jwWarjUnoXWKxXeVNKXjnkRAAs+ lQbyOYToj0ogrd0YKd5gbBBaW6V50PCKAofWSIFXI6UEN5y+RDEIC620gr1ajGnetc0A3TsSr QNfxvwB+dXYN36ezqTGhfaaHgplM+HIGEPRQLKq8eR/fNac7TPVVvI+OyMMu01yEuw21qYxLr JkqTmp5/0JGCaUROZQDMuKFpfeFcn70uZajwfB3Enkl3g4SPCAsVTAzahY90uAIX/GmDE6hM/ wWZY+pC8Bty0U6e3Ig2bZbMZgv0qp6GOps+fsIloeg9Vg7LCphWEPECIzhmrkW8NtYxvds81I KoP5A1H7U7iGUg7Zi5U0CVXyaeth2thvtLsGAuAqZncn5dzD4WPD9lrKfdtHvmzclsgECt5FT ZheVg50QfQIQ6y+0O0RY7cN9btHif6WzN4dBy0fdrMPuGm5oDpNo1U//v//3JwgAVCJU= 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_SLEEP is disabled, we get a build error in the cppi41 dmaengine driver, since the runtime-pm functions are hidden within the wrong #ifdef: drivers/dma/cppi41.c:1158:21: error: 'cppi41_runtime_suspend' undeclared here (not in a function) This removes the #ifdef and instead uses __maybe_unused annotations that cannot have this problem. Signed-off-by: Arnd Bergmann Fixes: fdea2d09b997 ("dmaengine: cppi41: Add basic PM runtime support") Acked-by: Tony Lindgren --- drivers/dma/cppi41.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/dma/cppi41.c b/drivers/dma/cppi41.c index ce8739fa3894..e6c3ba539c80 100644 --- a/drivers/dma/cppi41.c +++ b/drivers/dma/cppi41.c @@ -1090,8 +1090,7 @@ static int cppi41_dma_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM_SLEEP -static int cppi41_suspend(struct device *dev) +static int __maybe_unused cppi41_suspend(struct device *dev) { struct cppi41_dd *cdd = dev_get_drvdata(dev); @@ -1102,7 +1101,7 @@ static int cppi41_suspend(struct device *dev) return 0; } -static int cppi41_resume(struct device *dev) +static int __maybe_unused cppi41_resume(struct device *dev) { struct cppi41_dd *cdd = dev_get_drvdata(dev); struct cppi41_channel *c; @@ -1127,7 +1126,7 @@ static int cppi41_resume(struct device *dev) return 0; } -static int cppi41_runtime_suspend(struct device *dev) +static int __maybe_unused cppi41_runtime_suspend(struct device *dev) { struct cppi41_dd *cdd = dev_get_drvdata(dev); @@ -1136,7 +1135,7 @@ static int cppi41_runtime_suspend(struct device *dev) return 0; } -static int cppi41_runtime_resume(struct device *dev) +static int __maybe_unused cppi41_runtime_resume(struct device *dev) { struct cppi41_dd *cdd = dev_get_drvdata(dev); struct cppi41_channel *c, *_c; @@ -1151,7 +1150,6 @@ static int cppi41_runtime_resume(struct device *dev) return 0; } -#endif static const struct dev_pm_ops cppi41_pm_ops = { SET_LATE_SYSTEM_SLEEP_PM_OPS(cppi41_suspend, cppi41_resume)