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


Groups > linux.kernel > #1403762

[PATCH 2/2] Input: migor-ts: mark PM functions as __maybe_unused

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject [PATCH 2/2] Input: migor-ts: mark PM functions as __maybe_unused
Date 2016-05-19 16:00 +0200
Message-ID <rAwEy-vI-41@gated-at.bofh.it> (permalink)
References <rAwEx-vI-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The migor touchscreen driver is now available for COMPILE_TEST,
so we run into a harmless randconfig warning on ARM when CONFIG_PM
is disabled:

drivers/input/touchscreen/migor_ts.c:216:12: error: 'migor_ts_resume' defined but not used [-Werror=unused-function]
drivers/input/touchscreen/migor_ts.c:205:12: error: 'migor_ts_suspend' defined but not used [-Werror=unused-function]

This shuts up the warning by marking the two functions as __maybe_unused.
We could do the same thing by adding an #ifdef, but this version is
more reliable.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/input/touchscreen/migor_ts.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/touchscreen/migor_ts.c b/drivers/input/touchscreen/migor_ts.c
index e4b92c4cae3b..02fb11985819 100644
--- a/drivers/input/touchscreen/migor_ts.c
+++ b/drivers/input/touchscreen/migor_ts.c
@@ -202,7 +202,7 @@ static int migor_ts_remove(struct i2c_client *client)
 	return 0;
 }
 
-static int migor_ts_suspend(struct device *dev)
+static int __maybe_unused migor_ts_suspend(struct device *dev)
 {
 	struct i2c_client *client = to_i2c_client(dev);
 	struct migor_ts_priv *priv = i2c_get_clientdata(client);
@@ -213,7 +213,7 @@ static int migor_ts_suspend(struct device *dev)
 	return 0;
 }
 
-static int migor_ts_resume(struct device *dev)
+static int __maybe_unused migor_ts_resume(struct device *dev)
 {
 	struct i2c_client *client = to_i2c_client(dev);
 	struct migor_ts_priv *priv = i2c_get_clientdata(client);
-- 
2.7.0

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


Thread

[PATCH 2/2] Input: migor-ts: mark PM functions as __maybe_unused Arnd Bergmann <arnd@arndb.de> - 2016-05-19 16:00 +0200

csiph-web