Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755857AbcCBQCi (ORCPT ); Wed, 2 Mar 2016 11:02:38 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:59434 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932095AbcCBQAu (ORCPT ); Wed, 2 Mar 2016 11:00:50 -0500 From: Arnd Bergmann To: Dmitry Torokhov Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Shawn Guo , Robin Gong , Javier Martinez Canillas , Frank Li , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 12/14] keyboard: snvs-pwrkey: use __maybe_unused to hide pm functions Date: Wed, 2 Mar 2016 16:59:04 +0100 Message-Id: <1456934350-1389172-13-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1456934350-1389172-1-git-send-email-arnd@arndb.de> References: <1456934350-1389172-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:JTPlhiyb0sF3yicLhs9Ck0Ze0x/SK8Fob0OYaZ6dYSxmmnFDXE+ U7tMOLijtgo8PBdB9b6akLnnLHmXBhL1SH3491yuIOlhG2WgCb5yvUud076VFw/qXezdZRK TloNGrmpaoJiJU4fib2VoeKVvVb+S6h+eSew9T1BGBITbWBFps2hoa03U0/CYCI6ZKikHuc unhHT6rr9IXmfl+zdkxFw== X-UI-Out-Filterresults: notjunk:1;V01:K0:uE/2jO2dkPI=:ZW6WHiVSCdE4bXvBFo96HD u475MErREkcoHpPhI77ZNxqPUualcGrLu4nm1d6Uvp4e0TJJnE5E13gXCRv2vHRgrg/CadXAk 9z1O0MqpAoNTLF/P7LitYXCUuWxBk1FOVcTFc1tHbCc/ed7/i/E8uGmqD9pOCxQSGmh4YcrLw wk7P9mdZr2dESZdVqcyLMXeNPFjoWCYRgnfRcJUwaiZr8kvfZj4fXhwy8J+OKuEKu5r8Yhw3c OheQY6xzNF50wtALZoLnHtVWkdNP6oOSRW7Pou9NHUeiZpU6gTq2bWZ9JiAgjQVc8ZQ1jHUzj OwOvzgQXCSNiA4x+/JxttfEbctxKQon+III6+hSjnsu/4wyShXm2OlwxlIUbe2G+tjDkgEnph /AqemQ5A14pluykfSK2JyZdhRcKXm+7Xm03Nyc16ODWlqNLDHdGuEu3Hk8EzLp1MEMn7c3Qs7 YOlbsYTn3IdZr0IPhb6/EPuQQ+HqHyPj+3P0kxOfL7jZFxTH0ojj2YEuGkXqB1ZVbglxsMIpO wNUJBpD8H31oGpfE2hPX5jc3hcYK6/dAWhOTFbUxJLyjM+HOn3S2VPK85YI37tP3E7fBQbvtF 0hZ6+69gvLPD51afigFPOdPmvlrBpH/jnClcImQ9luDhW3fVcN1NmOcRe5IHFxmT0pjmm3v3a +JOpOkhq7kzKilGseK4Wdt1R4GWfRrY1UCev3lZvmWIY6UjVW9FFyuyQJUuf6kRsbkV0= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1624 Lines: 40 The SNVS power key driver has suspend/resume functions that are accessed using SIMPLE_DEV_PM_OPS, which hide the reference when CONFIG_PM_SLEEP is not set, resulting in a warning about unused functions: drivers/input/keyboard/snvs_pwrkey.c:183:12: error: 'imx_snvs_pwrkey_suspend' defined but not used [-Werror=unused-function] drivers/input/keyboard/snvs_pwrkey.c:194:12: error: 'imx_snvs_pwrkey_resume' defined but not used [-Werror=unused-function] This adds __maybe_unused annotations to let the compiler know it can silently drop the function definition. Signed-off-by: Arnd Bergmann --- drivers/input/keyboard/snvs_pwrkey.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/keyboard/snvs_pwrkey.c b/drivers/input/keyboard/snvs_pwrkey.c index 9adf13a5864a..b0ffadeb208c 100644 --- a/drivers/input/keyboard/snvs_pwrkey.c +++ b/drivers/input/keyboard/snvs_pwrkey.c @@ -180,7 +180,7 @@ static int imx_snvs_pwrkey_probe(struct platform_device *pdev) return 0; } -static int imx_snvs_pwrkey_suspend(struct device *dev) +static int __maybe_unused imx_snvs_pwrkey_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct pwrkey_drv_data *pdata = platform_get_drvdata(pdev); @@ -191,7 +191,7 @@ static int imx_snvs_pwrkey_suspend(struct device *dev) return 0; } -static int imx_snvs_pwrkey_resume(struct device *dev) +static int __maybe_unused imx_snvs_pwrkey_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct pwrkey_drv_data *pdata = platform_get_drvdata(pdev); -- 2.7.0