mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Svyatoslav Ryhel <clamor95@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Dmitry Osipenko <digetx@gmail.com>
Cc: linux-gpio@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v3 2/2] gpio: tegra: Switch to new *_PM_OPS macros
Date: Tue, 18 Oct 2022 11:49:05 +0300	[thread overview]
Message-ID: <20221018084905.21717-3-clamor95@gmail.com> (raw)
In-Reply-To: <20221018084905.21717-1-clamor95@gmail.com>

Since SET_*_PM_OPS() were deprecated, switch to new *_PM_OPS.

The callbacks that are only useful with CONFIG_PM_SLEEP is enabled,
are now wrapped with a pm_sleep_ptr().

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
 drivers/gpio/gpio-tegra.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 5b265a6fd3c1..ce17cc1a1cab 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -461,7 +461,6 @@ static int tegra_gpio_populate_parent_fwspec(struct gpio_chip *chip,
 	return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int tegra_gpio_resume(struct device *dev)
 {
 	struct tegra_gpio_info *tgi = dev_get_drvdata(dev);
@@ -569,7 +568,6 @@ static int tegra_gpio_irq_set_wake(struct irq_data *d, unsigned int enable)
 
 	return 0;
 }
-#endif
 
 static int tegra_gpio_irq_set_affinity(struct irq_data *data,
 				       const struct cpumask *dest,
@@ -613,9 +611,7 @@ static const struct irq_chip tegra_gpio_irq_chip = {
 	.irq_mask		= tegra_gpio_irq_mask,
 	.irq_unmask		= tegra_gpio_irq_unmask,
 	.irq_set_type		= tegra_gpio_irq_set_type,
-#ifdef CONFIG_PM_SLEEP
-	.irq_set_wake		= tegra_gpio_irq_set_wake,
-#endif
+	.irq_set_wake		= pm_sleep_ptr(tegra_gpio_irq_set_wake),
 	.irq_print_chip		= tegra_gpio_irq_print_chip,
 	.irq_request_resources	= tegra_gpio_irq_request_resources,
 	.irq_release_resources	= tegra_gpio_irq_release_resources,
@@ -629,9 +625,7 @@ static const struct irq_chip tegra210_gpio_irq_chip = {
 	.irq_unmask		= tegra_gpio_irq_unmask,
 	.irq_set_affinity	= tegra_gpio_irq_set_affinity,
 	.irq_set_type		= tegra_gpio_irq_set_type,
-#ifdef CONFIG_PM_SLEEP
-	.irq_set_wake		= tegra_gpio_irq_set_wake,
-#endif
+	.irq_set_wake		= pm_sleep_ptr(tegra_gpio_irq_set_wake),
 	.irq_print_chip		= tegra_gpio_irq_print_chip,
 	.irq_request_resources	= tegra_gpio_irq_request_resources,
 	.irq_release_resources	= tegra_gpio_irq_release_resources,
@@ -681,7 +675,7 @@ static inline void tegra_gpio_debuginit(struct tegra_gpio_info *tgi)
 #endif
 
 static const struct dev_pm_ops tegra_gpio_pm_ops = {
-	SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(tegra_gpio_suspend, tegra_gpio_resume)
+	NOIRQ_SYSTEM_SLEEP_PM_OPS(tegra_gpio_suspend, tegra_gpio_resume)
 };
 
 static const struct of_device_id tegra_pmc_of_match[] = {
-- 
2.34.1


  parent reply	other threads:[~2022-10-18  8:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-18  8:49 [PATCH v3 0/2] gpio: tegra: Convert to immutable irq chip Svyatoslav Ryhel
2022-10-18  8:49 ` [PATCH v3 1/2] " Svyatoslav Ryhel
2022-10-18  8:49 ` Svyatoslav Ryhel [this message]
2022-10-18 19:48   ` [PATCH v3 2/2] gpio: tegra: Switch to new *_PM_OPS macros kernel test robot

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=20221018084905.21717-3-clamor95@gmail.com \
    --to=clamor95@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=digetx@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    /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

all inboxes | Powered by JetHome®