lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221018084905.21717-3-clamor95@gmail.com>
Date:   Tue, 18 Oct 2022 11:49:05 +0300
From:   Svyatoslav Ryhel <clamor95@...il.com>
To:     Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <brgl@...ev.pl>,
        Thierry Reding <thierry.reding@...il.com>,
        Jonathan Hunter <jonathanh@...dia.com>,
        Dmitry Osipenko <digetx@...il.com>
Cc:     linux-gpio@...r.kernel.org, linux-tegra@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH v3 2/2] gpio: tegra: Switch to new *_PM_OPS macros

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@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ