On Thu, Jul 10, 2025 at 02:45:43PM +0530, Shivendra Pratap wrote: > The reboot-mode driver does not have a strict requirement for > device-based registration. It primarily uses the device's of_node > to read mode-<cmd> properties and the device pointer for logging. > > Remove the dependency on struct device and introduce support for > Device Tree (DT) node-based registration. This enables drivers > that are not associated with a struct device to leverage the > reboot-mode framework. > > Signed-off-by: Shivendra Pratap <shivendra.pratap@xxxxxxxxxxxxxxxx> > --- > drivers/power/reset/reboot-mode.c | 23 +++++++++++++---------- > include/linux/reboot-mode.h | 2 +- > 2 files changed, 14 insertions(+), 11 deletions(-) > > diff --git a/drivers/power/reset/reboot-mode.c b/drivers/power/reset/reboot-mode.c > index fba53f638da04655e756b5f8b7d2d666d1379535..61f647b23959789a313f3af0bd967abcad45fa43 100644 > --- a/drivers/power/reset/reboot-mode.c > +++ b/drivers/power/reset/reboot-mode.c > @@ -12,6 +12,7 @@ > #include <linux/reboot-mode.h> > > #define PREFIX "mode-" > +#define pr_fmt(fmt) "reboot-mode: " fmt This wasn't really tested. If I remember correctly, it should be defined before the first include. > > struct mode_info { > const char *mode; -- With best wishes Dmitry