Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932189AbcCBQBK (ORCPT ); Wed, 2 Mar 2016 11:01:10 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:55997 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753419AbcCBQBA (ORCPT ); Wed, 2 Mar 2016 11:01:00 -0500 From: Arnd Bergmann To: Dmitry Torokhov Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Rajeev Kumar , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/14] input: spear-keyboard: use __maybe_unused to hide pm functions Date: Wed, 2 Mar 2016 16:59:03 +0100 Message-Id: <1456934350-1389172-12-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:cXpHE511VTAACJgpSUUzCz+UKuc5TrrE4SET7wGLH2/85aUpepI 2XqjxrM0YCeR9ZmqJB0AC3zNllHj4hFvzEteEr49K/NY0PvilSkgvCcFz8uPpD0YUFKdXSH /3fCe2v3XhQx/AdN4F09j3R7G4/YN8QteyRhkC/w+Fa0R84j4sPzpbWNjsYy+79WpMBYgwD z7gX7TAF92zPcjp259OmA== X-UI-Out-Filterresults: notjunk:1;V01:K0:WTYEQr2FlPc=:O7uIr3z0CI9mfWyq+oqHn3 MncfKQryBohjBwN1gR3PnfE3mHd/DlkYXJQUUImzQJx4JSLMKlq2FAu8PLXWv838qG6x0jCPZ CW3b7YzZi3QQEWsytsJffSUH1wz0ZRDPcA5Il/znk45sUZ8d1uhvw6fU6NoioVvOM4PvuxUVk LEIOvm+ClqieZZOQmOtz6TE6QBj39xWGrCGdlaZf6wFRuVqCbb6HvC3z6FM3lSOxSHK1nCr+k n8BQOigT+GJ6SK5UHRxzSzyBB0AsAhhuTB/IuF9ZNP8L8fEpsikYroLVEK2INejG0JpLUnOla 0K2glTx/z9abtXtixb0iDBj+5RQ9IhecyXqC4W69aFjvohazUuIx8Fxi/Uo/sS1Nnfj8tKAsd OroNd1ZMEMlCIY/pf1CuxYC+vYWh8OoH25wxjIspb81pvZVi/HMMk2NhIm2xb5FHpigbLSZi4 ZhSF6MRHOEyi45iWbB/pY19okYxmbybFjyH0YWBUQzDxjCV14oqJohlkEUhFmlT77JvNyqStT MiFFSiuX2hdOL5kTpsLbpu1gPwAR1w1K9BU5jfUUCUy5fNU5tGEqETqufl4xLqkCI5+MNH+nW E2UB61BYKO3d5O7INk0chHry99AG8DMAMvif9qQ33OkFw5OgNVjOZnFzIfkrOQiqS9j5BfEPk hhyyup3jSrTkYRh0FAdzDTbJop8Ic0SI7ws00HcKcFWSyOqCNuIUs17USxx5/h3qnESE= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1792 Lines: 50 The spear keyboard driver uses #ifdef CONFIG_PM to hide its power management functions, but then uses references from SIMPLE_DEV_PM_OPS that are only present if both CONFIG_PM and CONFIG_PM_SLEEP are set, resulting in a warning about unused functions: drivers/input/keyboard/spear-keyboard.c:292:12: error: 'spear_kbd_suspend' defined but not used [-Werror=unused-function] drivers/input/keyboard/spear-keyboard.c:345:12: error: 'spear_kbd_resume' defined but not used [-Werror=unused-function] This removes the #ifdef and instead uses a __maybe_unused annotation. Signed-off-by: Arnd Bergmann --- drivers/input/keyboard/spear-keyboard.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/input/keyboard/spear-keyboard.c b/drivers/input/keyboard/spear-keyboard.c index 623d451767e3..8083eaa0524a 100644 --- a/drivers/input/keyboard/spear-keyboard.c +++ b/drivers/input/keyboard/spear-keyboard.c @@ -288,8 +288,7 @@ static int spear_kbd_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM -static int spear_kbd_suspend(struct device *dev) +static int __maybe_unused spear_kbd_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct spear_kbd *kbd = platform_get_drvdata(pdev); @@ -342,7 +341,7 @@ static int spear_kbd_suspend(struct device *dev) return 0; } -static int spear_kbd_resume(struct device *dev) +static int __maybe_unused spear_kbd_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct spear_kbd *kbd = platform_get_drvdata(pdev); @@ -368,7 +367,6 @@ static int spear_kbd_resume(struct device *dev) return 0; } -#endif static SIMPLE_DEV_PM_OPS(spear_kbd_pm_ops, spear_kbd_suspend, spear_kbd_resume); -- 2.7.0