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, 21 Mar 2022 16:04:14 +0000 (16:04 +0000)
commit89ec0b2bbfacf51335ba862b48c1ac128f19ddc2
tree65a6d32005b7878d64c3310463120c355b305fc4
parente0898e24bd87767618ada5971df8000286a348bd
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