From patchwork Fri May 25 21:08:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10428503 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 2A57B6038C for ; Fri, 25 May 2018 21:09:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 16182297E2 for ; Fri, 25 May 2018 21:09:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0A7C0297EB; Fri, 25 May 2018 21:09:18 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 94D45297E2 for ; Fri, 25 May 2018 21:09:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=gzpniJNGQP8qLzrssPtNc3qCyEjJDMITdpZ0ljtCuZs=; b=mSB 13PljRUEgzP3KydV7lptEsiEcBKdNMNbeJWxfVbhSchfcp4DVKG+zIb/lypyUzCdHThWbg8Btxkv/ OWqWuc4apzNT7y4USQgiMpbP5ftKLA6O00Y8SUzaN3TwQ0pjNYKzPL1XDcRkwc2B8SOjottuOCPON roYjHVD8RiITZk3UHPPttNalpYQC+h85sG6/l8tGjlUN0vvJdfETntZbAASyWupw9emQ86nGzEO27 Ooi0M50ELZOVkP7guPixWc6X88Ffm28hrq4Vz5glL71FB75CYKZCDvKk6yE+16E3iN0IMfGGH4LcC VdJJ7NHaD7dUGYo214nCRqh0c4VVMZw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fMJxW-0006wE-7f; Fri, 25 May 2018 21:09:10 +0000 Received: from mout.kundenserver.de ([212.227.17.13]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fMJxN-0006rv-B4 for linux-arm-kernel@lists.infradead.org; Fri, 25 May 2018 21:09:07 +0000 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0M8iVg-1fTyvh2lQq-00C6rD; Fri, 25 May 2018 23:08:45 +0200 From: Arnd Bergmann To: Thierry Reding , Maxime Coquelin , Alexandre Torgue Subject: [PATCH] pwm: stm32: fix build warning with CONFIG_DMA_ENGINE disabled Date: Fri, 25 May 2018 23:08:30 +0200 Message-Id: <20180525210843.1821071-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:+Fim8R0Ja3k85HCmDb2GmNGWMnqJJ1t1nOxSudEQgTeNt+z27hn fJaDp0W87fPuD7M+I1xV/nxs6hSC4wbPGHROZ6oLX2onGqaAJBGsuu/NPHw+feDhkFlV/MU EQYcouHPYL4O4YiU4FWzMKMEbnTG4ydkpCNxUIhRdJH9A8MCUjXGP8EZ0UrxM21rv131t/A Ssn0OHbol9HNyH2R1QrNg== X-UI-Out-Filterresults: notjunk:1; V01:K0:Opm8/xm9O6A=:+ykAXxA/oiYU2O+3yLc/i3 XmhUyfD3lF4MnY8HhqlZYkBHW+XxpsYF0ktV5IVCC6WsZL9letPxWO7SQzuXrlQODgUq6VVJk Pvj/DZ1bKFxMabWdbDEnmEHT4eWUTEfYYD4xscJxQCC4q5cN7JzTizjZJPWS3xLXhMvcylkgy /ABGE/TFQ43wyOxrcMhceNXsViHl8ktv3NDUiNHkQQfprzXftFyb7q4gAAFxapj0HXuWQ2mbs nT1BASnUtu8pqVaKCKQpwWclaYUhuxgmMMVVjBHjGzvgi0+8NXa0VFOs578QtsBNaOT+dHuua bmtSx6gbfKFtF+sItkcmtVoy9KO0asoOplEE0fXVUlqpVaiaBQuqLIGSbpM5xOqJHmybEkOPG TXLvKGPxTD949Se73QnjpPu3dt9U53ka0FbXm4+oXBLe3VelVMogJXifdZaeKcl3Twcdk0LjT dyeWf8+c9jryaG65K7sPaFo6MkjHfAatzAyY/zqBt1CrcYGfEptFoWZYMX8K0bq3SssNy/TMS sLCCuP58Bo1EKcJS7MMC9G94jNktPAAzmvu8prI+VZ8Z5U/SgNoApQmL+9eAKaTeSvKlsu1/S B+7KMC9M+j+YcT7IKATnq/6xO2IShtd0AVJGIJlwAk3ohBh+e6SQLEJsn8sDzKVWIegZSjVRV i9A+/sYTXqa4fQqwdQjoRPnPCWR+hXN08ckzDOy2FTUv64ee1ds+1ybJLKvznJC7C+B4= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180525_140901_703348_C2F07377 X-CRM114-Status: GOOD ( 11.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pwm@vger.kernel.org, Arnd Bergmann , linux-kernel@vger.kernel.org, Benjamin Gaignard , Fabrice Gasnier , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Without dmaengine support, we get a harmless warning about an unused function: drivers/pwm/pwm-stm32.c:166:12: error: 'stm32_pwm_capture' defined but not used [-Werror=unused-function] Changing the #ifdef to an IS_ENABLED() check shuts up that warning and is slightly nicer to read. Fixes: 53e38fe73f94 ("pwm: stm32: Add capture support") Signed-off-by: Arnd Bergmann Acked-by: Fabrice Gasnier Acked-by: Geert Uytterhoeven --- drivers/pwm/pwm-stm32.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pwm/pwm-stm32.c b/drivers/pwm/pwm-stm32.c index 60bfc07c4912..97bbc1f18fd6 100644 --- a/drivers/pwm/pwm-stm32.c +++ b/drivers/pwm/pwm-stm32.c @@ -484,9 +484,7 @@ static int stm32_pwm_apply_locked(struct pwm_chip *chip, struct pwm_device *pwm, static const struct pwm_ops stm32pwm_ops = { .owner = THIS_MODULE, .apply = stm32_pwm_apply_locked, -#if IS_ENABLED(CONFIG_DMA_ENGINE) - .capture = stm32_pwm_capture, -#endif + .capture = IS_ENABLED(CONFIG_DMA_ENGINE) ? stm32_pwm_capture : NULL, }; static int stm32_pwm_set_breakinput(struct stm32_pwm *priv,