All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Input: adp5589-keys - mark suspend and resume methods as __maybe_unused
@ 2020-11-19  7:24 Dmitry Torokhov
  2020-11-19  8:08 ` Ardelean, Alexandru
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Torokhov @ 2020-11-19  7:24 UTC (permalink / raw)
  To: linux-input; +Cc: Alexandru Ardelean, linux-kernel

This improves compile coverage of the code; unused code will be dropped by
the linker.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/input/keyboard/adp5589-keys.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/input/keyboard/adp5589-keys.c b/drivers/input/keyboard/adp5589-keys.c
index 31145a85c819..a9b69a268c09 100644
--- a/drivers/input/keyboard/adp5589-keys.c
+++ b/drivers/input/keyboard/adp5589-keys.c
@@ -1016,8 +1016,7 @@ static int adp5589_probe(struct i2c_client *client,
 	return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
-static int adp5589_suspend(struct device *dev)
+static int __maybe_unused adp5589_suspend(struct device *dev)
 {
 	struct adp5589_kpad *kpad = dev_get_drvdata(dev);
 	struct i2c_client *client = kpad->client;
@@ -1033,7 +1032,7 @@ static int adp5589_suspend(struct device *dev)
 	return 0;
 }
 
-static int adp5589_resume(struct device *dev)
+static int __maybe_unused adp5589_resume(struct device *dev)
 {
 	struct adp5589_kpad *kpad = dev_get_drvdata(dev);
 	struct i2c_client *client = kpad->client;
@@ -1048,7 +1047,6 @@ static int adp5589_resume(struct device *dev)
 
 	return 0;
 }
-#endif
 
 static SIMPLE_DEV_PM_OPS(adp5589_dev_pm_ops, adp5589_suspend, adp5589_resume);
 
-- 
2.29.2.299.gdc1121823c-goog


-- 
Dmitry

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

* RE: [PATCH] Input: adp5589-keys - mark suspend and resume methods as __maybe_unused
  2020-11-19  7:24 [PATCH] Input: adp5589-keys - mark suspend and resume methods as __maybe_unused Dmitry Torokhov
@ 2020-11-19  8:08 ` Ardelean, Alexandru
  0 siblings, 0 replies; 2+ messages in thread
From: Ardelean, Alexandru @ 2020-11-19  8:08 UTC (permalink / raw)
  To: Dmitry Torokhov, linux-input; +Cc: linux-kernel



> -----Original Message-----
> From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Sent: Thursday, November 19, 2020 9:24 AM
> To: linux-input@vger.kernel.org
> Cc: Ardelean, Alexandru <alexandru.Ardelean@analog.com>; linux-
> kernel@vger.kernel.org
> Subject: [PATCH] Input: adp5589-keys - mark suspend and resume methods as
> __maybe_unused
> 
> [External]
> 
> This improves compile coverage of the code; unused code will be dropped by the
> linker.
> 

Acked-by: Alexandru Ardelean <Alexandru.ardelean@analog.com>

> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
>  drivers/input/keyboard/adp5589-keys.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/input/keyboard/adp5589-keys.c
> b/drivers/input/keyboard/adp5589-keys.c
> index 31145a85c819..a9b69a268c09 100644
> --- a/drivers/input/keyboard/adp5589-keys.c
> +++ b/drivers/input/keyboard/adp5589-keys.c
> @@ -1016,8 +1016,7 @@ static int adp5589_probe(struct i2c_client *client,
>  	return 0;
>  }
> 
> -#ifdef CONFIG_PM_SLEEP
> -static int adp5589_suspend(struct device *dev)
> +static int __maybe_unused adp5589_suspend(struct device *dev)
>  {
>  	struct adp5589_kpad *kpad = dev_get_drvdata(dev);
>  	struct i2c_client *client = kpad->client; @@ -1033,7 +1032,7 @@ static
> int adp5589_suspend(struct device *dev)
>  	return 0;
>  }
> 
> -static int adp5589_resume(struct device *dev)
> +static int __maybe_unused adp5589_resume(struct device *dev)
>  {
>  	struct adp5589_kpad *kpad = dev_get_drvdata(dev);
>  	struct i2c_client *client = kpad->client; @@ -1048,7 +1047,6 @@ static
> int adp5589_resume(struct device *dev)
> 
>  	return 0;
>  }
> -#endif
> 
>  static SIMPLE_DEV_PM_OPS(adp5589_dev_pm_ops, adp5589_suspend,
> adp5589_resume);
> 
> --
> 2.29.2.299.gdc1121823c-goog
> 
> 
> --
> Dmitry

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

end of thread, other threads:[~2020-11-19  8:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-19  7:24 [PATCH] Input: adp5589-keys - mark suspend and resume methods as __maybe_unused Dmitry Torokhov
2020-11-19  8:08 ` Ardelean, Alexandru

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.