linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nuno Sá" <nuno.sa@analog.com>
To: <linux-input@vger.kernel.org>, <linux-gpio@vger.kernel.org>,
	<devicetree@vger.kernel.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Michael Hennerich <michael.hennerich@analog.com>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	"Andy Shevchenko" <andy.shevchenko@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: [PATCH v3 10/10] input: keyboard: adp5588-keys: Use new PM macros
Date: Thu, 21 Jul 2022 10:04:23 +0200	[thread overview]
Message-ID: <20220721080423.156151-11-nuno.sa@analog.com> (raw)
In-Reply-To: <20220721080423.156151-1-nuno.sa@analog.com>

With the new PM macros (DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()), the
compiler has visibility to see that the functions are not used when
!CONFIG_PM and hence, remove the dead code. As such, there's no need
for '__maybe_unused'.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
---
 drivers/input/keyboard/adp5588-keys.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/input/keyboard/adp5588-keys.c b/drivers/input/keyboard/adp5588-keys.c
index 3aa65d8d9f29..111e593e2f63 100644
--- a/drivers/input/keyboard/adp5588-keys.c
+++ b/drivers/input/keyboard/adp5588-keys.c
@@ -821,7 +821,7 @@ static int adp5588_remove(struct i2c_client *client)
 	return 0;
 }
 
-static int __maybe_unused adp5588_suspend(struct device *dev)
+static int adp5588_suspend(struct device *dev)
 {
 	struct i2c_client *client = to_i2c_client(dev);
 
@@ -830,7 +830,7 @@ static int __maybe_unused adp5588_suspend(struct device *dev)
 	return 0;
 }
 
-static int __maybe_unused adp5588_resume(struct device *dev)
+static int adp5588_resume(struct device *dev)
 {
 	struct i2c_client *client = to_i2c_client(dev);
 
@@ -839,7 +839,7 @@ static int __maybe_unused adp5588_resume(struct device *dev)
 	return 0;
 }
 
-static SIMPLE_DEV_PM_OPS(adp5588_dev_pm_ops, adp5588_suspend, adp5588_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(adp5588_dev_pm_ops, adp5588_suspend, adp5588_resume);
 
 static const struct i2c_device_id adp5588_id[] = {
 	{ "adp5588-keys", 0 },
@@ -859,7 +859,7 @@ static struct i2c_driver adp5588_driver = {
 	.driver = {
 		.name = KBUILD_MODNAME,
 		.of_match_table = adp5588_of_match,
-		.pm   = &adp5588_dev_pm_ops,
+		.pm   = pm_sleep_ptr(&adp5588_dev_pm_ops),
 	},
 	.probe    = adp5588_probe,
 	.remove   = adp5588_remove,
-- 
2.37.1


      parent reply	other threads:[~2022-07-21  8:03 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-21  8:04 [PATCH v3 00/10] adp5588-keys refactor and fw properties support Nuno Sá
2022-07-21  8:04 ` [PATCH v3 01/10] input: keyboard: adp5588-keys: support gpi key events as 'gpio keys' Nuno Sá
2022-07-23  4:56   ` kernel test robot
2022-07-25 20:31     ` Andy Shevchenko
2022-08-29 11:21       ` Sa, Nuno
2022-07-25 20:34   ` Andy Shevchenko
2022-08-29 11:20     ` Sa, Nuno
2022-07-26 10:30   ` kernel test robot
2022-08-31 12:24   ` Linus Walleij
2022-08-31 12:26     ` Andy Shevchenko
2022-08-31 12:28     ` Sa, Nuno
2022-08-31 12:30       ` Linus Walleij
2022-07-21  8:04 ` [PATCH v3 02/10] gpio: gpio-adp5588: drop the driver Nuno Sá
2022-07-21  8:04 ` [PATCH v3 03/10] input: keyboard: adp5588-keys: bail out on returned error Nuno Sá
2022-07-21  8:04 ` [PATCH v3 04/10] input: keyboard: adp5588-keys: add support for fw properties Nuno Sá
2022-07-21  8:04 ` [PATCH v3 05/10] dt-bindings: input: adp5588: add bindings Nuno Sá
2022-07-21  8:33   ` Krzysztof Kozlowski
2022-07-21  8:04 ` [PATCH v3 06/10] input: keyboard: adp5588-keys: do not check for irq presence Nuno Sá
2022-07-21  8:04 ` [PATCH v3 07/10] input: keyboard: adp5588-keys: fix coding style warnings Nuno Sá
2022-07-21  8:04 ` [PATCH v3 08/10] input: keyboard: adp5588-keys: add optional reset gpio Nuno Sá
2022-07-21  8:04 ` [PATCH v3 09/10] input: keyboard: adp5588-keys: add regulator support Nuno Sá
2022-07-21  8:04 ` Nuno Sá [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220721080423.156151-11-nuno.sa@analog.com \
    --to=nuno.sa@analog.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=michael.hennerich@analog.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).