summaryrefslogtreecommitdiff
path: root/include/linux/reboot.h
diff options
context:
space:
mode:
authorBenjamin Bara <benjamin.bara@skidata.com>2023-07-15 09:53:25 +0200
committerLee Jones <lee@kernel.org>2023-07-28 11:33:09 +0100
commitdb2d6038c5e795cab4f0a8d3e86b4f7e33338629 (patch)
tree6b318ccae04af4045ba2b81632021e9a4b11c1ce /include/linux/reboot.h
parentaa49c90894d06e18a1ee7c095edbd2f37c232d02 (diff)
kernel/reboot: Add device to sys_off_handler
If the dev is known (e.g. a devm-based sys_off_handler is used), it can be passed to the handler's callback to have it available there. Otherwise, cb_data might be set to the dev in most of the cases. Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by: Benjamin Bara <benjamin.bara@skidata.com> Link: https://lore.kernel.org/r/20230327-tegra-pmic-reboot-v7-3-18699d5dcd76@skidata.com Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'include/linux/reboot.h')
-rw-r--r--include/linux/reboot.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/reboot.h b/include/linux/reboot.h
index 2b6bb593be5b..c4cc3b89ced1 100644
--- a/include/linux/reboot.h
+++ b/include/linux/reboot.h
@@ -129,11 +129,14 @@ enum sys_off_mode {
* @cb_data: User's callback data.
* @cmd: Command string. Currently used only by the sys-off restart mode,
* NULL otherwise.
+ * @dev: Device of the sys-off handler. Only if known (devm_register_*),
+ * NULL otherwise.
*/
struct sys_off_data {
int mode;
void *cb_data;
const char *cmd;
+ struct device *dev;
};
struct sys_off_handler *