diff mbox series

Input: adp5589-keys - mark suspend and resume methods as __maybe_unused

Message ID 20201119072418.GA114677@dtor-ws (mailing list archive)
State Accepted
Commit a26506788320d8dda4e3520dd1b020f20cc7a2fd
Headers show
Series Input: adp5589-keys - mark suspend and resume methods as __maybe_unused | expand

Commit Message

Dmitry Torokhov Nov. 19, 2020, 7:24 a.m. UTC
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(-)

Comments

Alexandru Ardelean Nov. 19, 2020, 8:08 a.m. UTC | #1
> -----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
diff mbox series

Patch

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