Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754871AbdCTNWf (ORCPT ); Mon, 20 Mar 2017 09:22:35 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:60132 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753771AbdCTNVm (ORCPT ); Mon, 20 Mar 2017 09:21:42 -0400 From: Arnd Bergmann To: Sebastian Reichel Cc: Arnd Bergmann , Tony Lindgren , Liam Breck , Mark Greer , Colin Ian King , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] power: bq24190_charger: mark PM functions as __maybe_unused Date: Mon, 20 Mar 2017 14:14:15 +0100 Message-Id: <20170320131424.271241-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:DdSsQRI+c6qp9hkPffVF8mS1de9OAohg2oJJhApnghtmk57tkxu yiqzvHiJk+gaamSofof2Y0t/x6oTqlyOUPGPWBaZQiY8/c/O1xKBOjloP3MU7qP+MAKDVDl 8zYZfW8i+kb41wX3HVQi9rJ142uKEy4lGHT+U9RHBDQEe4PlUdIL6Btj0rftZJXssZtjeZ4 iZQoCaxXKb+qI4LsUcW1w== X-UI-Out-Filterresults: notjunk:1;V01:K0:hdiXo+akurQ=:n1ahoVrNMe+oDz1+dJVXBf PryM9j+vIFILvADqzMv8u0oPEjnLOQ91Lo8j9pYS9dX61GszfJzodSpKn3lLLHrCe+zOFiqWH MG+rmlIspz5XKucYhh6M5SgxCE0JyHT/eM0uDdi4oPP5tRfSn9VbIU7+nBoxlP0RVCZqqDdHf APU3/qH8C/sqNahwCt5pB5CL2ATDxlfUvv284F9+8UVZrUC0HhrJhBPZQnahbRMGpH1y7h+Ww 0N6eS2SaXCXEDM+FnpzEqIwDU3YBDcqfXY/57M+oJoaGJnY2c4wToWxh7QrCZPR9iFHJlq6Bf R9k2dxGcKy2fGlQgyPz0dIkP2IIVYlHlpp7JmU+dtC64CDVp8SF5Sfw9E6rBIs2MpW+I0DKpT 3KbL6JYiRe4cCkupXIDKzXn7ALX9oBvwSPWWLWPw09jTjmfmJLJ8/0gj5M6/I6mSQpFFekjQw tds87vJFMSzmCtl/8Jxi0PGCARAo1NXYHicg+zkd6+TvrudDBOTZtu+ZtxYxSGadnhmxw5yNd Wx29ON2IQXuY2IIN5fJhRFupCKgHoe24J+tNikJYARi4mTwvIak8GHQR5K81ijyDhJu1LMDhP WRb+7PJSQFdsSPUFB4FqX9HlHQpQCDf/U5RT9HF8Poj1dR7yS/U5eWFSScbfLIBz6S6XYc1T5 45JaPyUu9hMxcWvqfId9eOVvAq2b51qdWHmtg7Wp+HX/c7tkPfH3NaPk6XJSOVjmZouM= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2451 Lines: 65 Without CONFIG_PM, we get a harmless warning: drivers/power/supply/bq24190_charger.c:1514:12: error: 'bq24190_runtime_resume' defined but not used [-Werror=unused-function] drivers/power/supply/bq24190_charger.c:1501:12: error: 'bq24190_runtime_suspend' defined but not used [-Werror=unused-function] To avoid the warning, we can mark all four PM functions as __maybe_unused, which also lets us remove the incorrect #ifdef. Fixes: 3d8090cba638 ("power: bq24190_charger: Check the interrupt status on resume") Signed-off-by: Arnd Bergmann --- drivers/power/supply/bq24190_charger.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/power/supply/bq24190_charger.c b/drivers/power/supply/bq24190_charger.c index 6d80670586eb..451f2bc05ea5 100644 --- a/drivers/power/supply/bq24190_charger.c +++ b/drivers/power/supply/bq24190_charger.c @@ -1498,7 +1498,7 @@ static int bq24190_remove(struct i2c_client *client) return 0; } -static int bq24190_runtime_suspend(struct device *dev) +static __maybe_unused int bq24190_runtime_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct bq24190_dev_info *bdi = i2c_get_clientdata(client); @@ -1511,7 +1511,7 @@ static int bq24190_runtime_suspend(struct device *dev) return 0; } -static int bq24190_runtime_resume(struct device *dev) +static __maybe_unused int bq24190_runtime_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct bq24190_dev_info *bdi = i2c_get_clientdata(client); @@ -1527,8 +1527,7 @@ static int bq24190_runtime_resume(struct device *dev) return 0; } -#ifdef CONFIG_PM_SLEEP -static int bq24190_pm_suspend(struct device *dev) +static __maybe_unused int bq24190_pm_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct bq24190_dev_info *bdi = i2c_get_clientdata(client); @@ -1550,7 +1549,7 @@ static int bq24190_pm_suspend(struct device *dev) return 0; } -static int bq24190_pm_resume(struct device *dev) +static __maybe_unused int bq24190_pm_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct bq24190_dev_info *bdi = i2c_get_clientdata(client); @@ -1580,7 +1579,6 @@ static int bq24190_pm_resume(struct device *dev) return 0; } -#endif static const struct dev_pm_ops bq24190_pm_ops = { SET_RUNTIME_PM_OPS(bq24190_runtime_suspend, bq24190_runtime_resume, -- 2.9.0