linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: stmfts - mark all PM functions as __maybe_unused
@ 2017-06-09 10:32 Arnd Bergmann
  2017-06-09 16:58 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2017-06-09 10:32 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Arnd Bergmann, Rob Herring, Javier Martinez Canillas, Andi Shyti,
	linux-input, linux-kernel

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Input: stmfts - mark all PM functions as __maybe_unused
  2017-06-09 10:32 [PATCH] Input: stmfts - mark all PM functions as __maybe_unused Arnd Bergmann
@ 2017-06-09 16:58 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2017-06-09 16:58 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Rob Herring, Javier Martinez Canillas, Andi Shyti, linux-input,
	linux-kernel

On Fri, Jun 09, 2017 at 12:32:48PM +0200, Arnd Bergmann wrote:
> 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>

Applied, thank you.

> ---
>  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
> 

-- 
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-09 16:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-09 10:32 [PATCH] Input: stmfts - mark all PM functions as __maybe_unused Arnd Bergmann
2017-06-09 16:58 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).