diff options
author | Lee Jones <lee@kernel.org> | 2023-11-01 10:00:28 +0000 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2023-11-01 10:00:28 +0000 |
commit | 55bb1a507fe3940fb2db99077d9e31046ad52247 (patch) | |
tree | fa6c6db47f01ed25bfcfb173672b9d4b687b108a /kernel | |
parent | 0bb80ecc33a8fb5a682236443c1e740d5c917d1d (diff) | |
parent | 510f276df2b91efd73f6c53be62b7e692ff533c1 (diff) |
Merge tag 'ib-mfd-i2c-reboot-v6.7' into ibs-for-mfd-merged
Immutable branch between MFD, I2C and Reboot due for the v6.7 merge window
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/reboot.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/reboot.c b/kernel/reboot.c index 3bba88c7ffc6..395a0ea3c7a8 100644 --- a/kernel/reboot.c +++ b/kernel/reboot.c @@ -55,6 +55,7 @@ struct sys_off_handler { enum sys_off_mode mode; bool blocking; void *list; + struct device *dev; }; /* @@ -74,6 +75,7 @@ void __weak (*pm_power_off)(void); void emergency_restart(void) { kmsg_dump(KMSG_DUMP_EMERG); + system_state = SYSTEM_RESTART; machine_emergency_restart(); } EXPORT_SYMBOL_GPL(emergency_restart); @@ -323,6 +325,7 @@ static int sys_off_notify(struct notifier_block *nb, data.cb_data = handler->cb_data; data.mode = mode; data.cmd = cmd; + data.dev = handler->dev; return handler->sys_off_cb(&data); } @@ -510,6 +513,7 @@ int devm_register_sys_off_handler(struct device *dev, handler = register_sys_off_handler(mode, priority, callback, cb_data); if (IS_ERR(handler)) return PTR_ERR(handler); + handler->dev = dev; return devm_add_action_or_reset(dev, devm_unregister_sys_off_handler, handler); |