gpio-poweroff: Remember the old poweroff handler
authorPhil Elwell <phil@raspberrypi.com>
Tue, 27 Apr 2021 07:59:01 +0000 (08:59 +0100)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:33:10 +0000 (11:33 +0000)
commit5d358d01c56b474a3a159acd56e4121f67c163d3
treec14034d19c32035cc5a04bc7d6d351381188a395
parent1762f0f7745b614b69376e719d1fcd0c25bb9e5b
gpio-poweroff: Remember the old poweroff handler

Keeping a copy of the old poweroff handler allows it to be restored
should this module be unloaded, but also provides a fallback if the
power hasn't been removed when the timeout elapses.

See: https://github.com/raspberrypi/rpi-eeprom/issues/330

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
drivers/power/reset/gpio-poweroff.c