On 4/20/22 21:47, Rafael J. Wysocki wrote: >>>> + void (*platform_power_off_cb)(void); >>>> + void (*simple_power_off_cb)(void *data); >>>> + void *simple_power_off_cb_data; >>> Is there any particular reason to put these callbacks here and not >>> directly into struct sys_off_handler? >> They are used internally by reboot.c and shouldn't be touched by the >> kernel API users, so I wanted to factor out and protect all the private >> data. > But they come from these users anyway, don't they? > Yes, the point is that these callback pointers are owned by the kernel core while callbacks are registered. -- Best regards, Dmitry