Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932126AbcCBQAv (ORCPT ); Wed, 2 Mar 2016 11:00:51 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:52800 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755070AbcCBQAq (ORCPT ); Wed, 2 Mar 2016 11:00:46 -0500 From: Arnd Bergmann To: Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/14] power: ipaq-micro-battery: use __maybe_unused to hide pm functions Date: Wed, 2 Mar 2016 16:58:55 +0100 Message-Id: <1456934350-1389172-4-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:9q0TQVdWAXmQ+WcgleRqY3bgCpM1ckmFJkLDZtzCmGsKcWPLniu Vx2qYMzUdxIF+tNjdyPkiMdbuPmadM+KwnOYt37txpuHWwrKKgDn6y+ZSfwxc6YKd99OPPh ZL58shI2env8roSbw79NPhmQ2fNemn3cF07xNwxss/vpYH75Zth+BVrhNBm1kifmTQdRhir KTVS/n7h88fbwg8RL2Rbg== X-UI-Out-Filterresults: notjunk:1;V01:K0:LjlzcNQI8PU=:H6X/lg787c8KXVqVSaXWnD SmWa2qZSuEc5XUPpkaSwXQyVozEUHEti9WcyIBBWt8DEpffasPS9kzkzZJgAse50Ixx5KbCVb oSaaUDvzqk/QhuJRtBbOaF7E+vENXDoirX5qRrPcl8ijVJ+y1X2hJo2+9y+VxQi/AyA8igYtS MqjPPwlM8jmGiYrA+EJVP0XIpcv/79ogXGgw2NIpsZbFfjZuB7BTSMoyRw87emf6md2NvIusT R9e/aKRpgDWClHy7wR4A+SFzJbkrPuvprpNLc717o9+AVcyV/trGigGynQ+AQsvO/ckLCWhKf WombwPW5MNiS5hRKvmL87pw+OIncv1r2U5NBHvkFDWtueI5ZsicPNKzObxufH4Wf/DpnJadab HO9X6CA4VONpE1Yn8WPde7aPhdSkKp3p6YY+/S54WMsqI4Mx5Ef2n3jSPKWZTSd5nJ64UYE4p fI9Sngp+uL+Av1hQNgzObaLhFKiMFyiNVsSL6ZrV3kK3f69ACO/Mw0wlo+nL9nunAqPD62e1S DVV3oh1SM4IR8N+VUPeryBSZJ+OvYf6TdGWjZQe21FoB18u6cPJK6ha+t0X0XIqRFKr9KOjUY GQyFw5HxGrZLTjqNQHasNHix7xeZ9TPeP8UjV2q7eIlpNckqCj7g59M9kD4Karx7wJktngSRA VD3gyvEPC+gVyKFCGnZWuYpKDuJLddBHsBY+k0lr0tnGpBAiwvFZDtwRygDhY2MB+hKA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1441 Lines: 40 The ipaq micro battery 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/power/ipaq_micro_battery.c:284:12: error: 'micro_batt_suspend' defined but not used [-Werror=unused-function] drivers/power/ipaq_micro_battery.c:292:12: error: 'micro_batt_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/power/ipaq_micro_battery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/power/ipaq_micro_battery.c b/drivers/power/ipaq_micro_battery.c index f03014ea1dc4..3f314b1a30d7 100644 --- a/drivers/power/ipaq_micro_battery.c +++ b/drivers/power/ipaq_micro_battery.c @@ -281,7 +281,7 @@ static int micro_batt_remove(struct platform_device *pdev) return 0; } -static int micro_batt_suspend(struct device *dev) +static int __maybe_unused micro_batt_suspend(struct device *dev) { struct micro_battery *mb = dev_get_drvdata(dev); @@ -289,7 +289,7 @@ static int micro_batt_suspend(struct device *dev) return 0; } -static int micro_batt_resume(struct device *dev) +static int __maybe_unused micro_batt_resume(struct device *dev) { struct micro_battery *mb = dev_get_drvdata(dev); -- 2.7.0