[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240123164443.394642-4-afd@ti.com>
Date: Tue, 23 Jan 2024 10:44:42 -0600
From: Andrew Davis <afd@...com>
To: Mark Rutland <mark.rutland@....com>,
Lorenzo Pieralisi
<lpieralisi@...nel.org>,
Sebastian Reichel <sre@...nel.org>,
Karol Gugala
<kgugala@...micro.com>,
Mateusz Holenko <mholenko@...micro.com>,
Gabriel
Somlo <gsomlo@...il.com>, Joel Stanley <joel@....id.au>,
Mark Brown
<broonie@...nel.org>, Orson Zhai <orsonzhai@...il.com>,
Baolin Wang
<baolin.wang@...ux.alibaba.com>,
Chunyan Zhang <zhang.lyra@...il.com>, Lee
Jones <lee@...nel.org>,
Dmitry Osipenko <dmitry.osipenko@...labora.com>
CC: <linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
<linux-pm@...r.kernel.org>, <linux-spi@...r.kernel.org>,
Andrew Davis
<afd@...com>
Subject: [PATCH 3/4] firmware: psci: Use register_sys_off_handler(SYS_OFF_MODE_RESTART)
Function register_restart_handler() is deprecated. Using this new API
removes our need to keep and manage a struct notifier_block.
Signed-off-by: Andrew Davis <afd@...com>
---
drivers/firmware/psci/psci.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c
index d9629ff878619..767a5af5384b4 100644
--- a/drivers/firmware/psci/psci.c
+++ b/drivers/firmware/psci/psci.c
@@ -305,8 +305,7 @@ static int get_set_conduit_method(const struct device_node *np)
return 0;
}
-static int psci_sys_reset(struct notifier_block *nb, unsigned long action,
- void *data)
+static int psci_sys_reset(struct sys_off_data *data)
{
if ((reboot_mode == REBOOT_WARM || reboot_mode == REBOOT_SOFT) &&
psci_system_reset2_supported) {
@@ -323,11 +322,6 @@ static int psci_sys_reset(struct notifier_block *nb, unsigned long action,
return NOTIFY_DONE;
}
-static struct notifier_block psci_sys_reset_nb = {
- .notifier_call = psci_sys_reset,
- .priority = 129,
-};
-
static void psci_sys_poweroff(void)
{
invoke_psci_fn(PSCI_0_2_FN_SYSTEM_OFF, 0, 0, 0);
@@ -623,7 +617,7 @@ static void __init psci_0_2_set_functions(void)
.migrate_info_type = psci_migrate_info_type,
};
- register_restart_handler(&psci_sys_reset_nb);
+ register_sys_off_handler(SYS_OFF_MODE_RESTART, 129, psci_sys_reset, NULL);
pm_power_off = psci_sys_poweroff;
}
--
2.39.2
Powered by blists - more mailing lists