diff options
author | Andrew Davis <afd@ti.com> | 2024-10-11 22:16:41 +0200 |
---|---|---|
committer | Shawn Guo <shawnguo@kernel.org> | 2024-10-22 03:25:30 +0200 |
commit | 2f76989999a7434e95fabf7d9d9f9449f746c827 (patch) | |
tree | 42f6317a0c0166af3064c7df8e890009e9aca3e6 /arch/arm/mach-imx | |
parent | Linux 6.12-rc1 (diff) | |
download | linux-2f76989999a7434e95fabf7d9d9f9449f746c827.tar.xz linux-2f76989999a7434e95fabf7d9d9f9449f746c827.zip |
ARM: imx: Switch to new sys-off handler API
Kernel now supports chained power-off handlers. Use
register_platform_power_off() that registers a platform level power-off
handler. Legacy pm_power_off() will be removed once all drivers and archs
are converted to the new sys-off API.
Signed-off-by: Andrew Davis <afd@ti.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r-- | arch/arm/mach-imx/pm-imx6.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/arm/mach-imx/pm-imx6.c b/arch/arm/mach-imx/pm-imx6.c index b36f05b54cc7..a671ca498f88 100644 --- a/arch/arm/mach-imx/pm-imx6.c +++ b/arch/arm/mach-imx/pm-imx6.c @@ -634,13 +634,11 @@ static void imx6_pm_stby_poweroff(void) static int imx6_pm_stby_poweroff_probe(void) { - if (pm_power_off) { - pr_warn("%s: pm_power_off already claimed %p %ps!\n", - __func__, pm_power_off, pm_power_off); + if (register_platform_power_off(imx6_pm_stby_poweroff)) { + pr_warn("%s: platform power off already claimed!\n", __func__); return -EBUSY; } - pm_power_off = imx6_pm_stby_poweroff; return 0; } |