Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1662267

[PATCH] Input: stmfts - mark all PM functions as __maybe_unused

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject [PATCH] Input: stmfts - mark all PM functions as __maybe_unused
Date 2017-06-09 12:40 +0200
Message-ID <tQpuG-nf-9@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


We get a harmless warning when CONFIG_RUNTIME_PM is disabled:

drivers/input/touchscreen/stmfts.c:760:12: error: 'stmfts_runtime_resume' defined but not used [-Werror=unused-function]
 static int stmfts_runtime_resume(struct device *dev)
drivers/input/touchscreen/stmfts.c:748:12: error: 'stmfts_runtime_suspend' defined but not used [-Werror=unused-function]
 static int stmfts_runtime_suspend(struct device *dev)

The regular PM functions are already marked as __maybe_unused, so let's
do the same for the runtime-PM as well.

Fixes: 78bcac7b2ae1 ("Input: add support for the STMicroelectronics FingerTip touchscreen")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/input/touchscreen/stmfts.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/touchscreen/stmfts.c b/drivers/input/touchscreen/stmfts.c
index 802d0e82d034..157fdb4bb2e8 100644
--- a/drivers/input/touchscreen/stmfts.c
+++ b/drivers/input/touchscreen/stmfts.c
@@ -745,7 +745,7 @@ static int stmfts_remove(struct i2c_client *client)
 	return 0;
 }
 
-static int stmfts_runtime_suspend(struct device *dev)
+static int __maybe_unused stmfts_runtime_suspend(struct device *dev)
 {
 	struct stmfts_data *sdata = dev_get_drvdata(dev);
 	int ret;
@@ -757,7 +757,7 @@ static int stmfts_runtime_suspend(struct device *dev)
 	return ret;
 }
 
-static int stmfts_runtime_resume(struct device *dev)
+static int __maybe_unused stmfts_runtime_resume(struct device *dev)
 {
 	struct stmfts_data *sdata = dev_get_drvdata(dev);
 	int ret;
-- 
2.9.0

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH] Input: stmfts - mark all PM functions as __maybe_unused Arnd Bergmann <arnd@arndb.de> - 2017-06-09 12:40 +0200
  Re: [PATCH] Input: stmfts - mark all PM functions as __maybe_unused Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-06-09 19:00 +0200

csiph-web