diff options
-rw-r--r-- | common/restart.c | 4 | ||||
-rw-r--r-- | include/restart.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/common/restart.c b/common/restart.c index b19ae54657..dd15c8d5c3 100644 --- a/common/restart.c +++ b/common/restart.c @@ -19,6 +19,7 @@ #include <of.h> static LIST_HEAD(restart_handler_list); +static unsigned resetidx; /** * restart_handler_register() - register a handler for restarting the system @@ -31,7 +32,7 @@ static LIST_HEAD(restart_handler_list); int restart_handler_register(struct restart_handler *rst) { if (!rst->name) - rst->name = RESTART_DEFAULT_NAME; + rst->name = basprintf("reset%u", resetidx); if (!rst->priority) rst->priority = RESTART_DEFAULT_PRIORITY; @@ -40,6 +41,7 @@ int restart_handler_register(struct restart_handler *rst) pr_debug("registering restart handler \"%s\" with priority %d\n", rst->name, rst->priority); + resetidx++; return 0; } diff --git a/include/restart.h b/include/restart.h index 7ec0910e94..6880b03b93 100644 --- a/include/restart.h +++ b/include/restart.h @@ -15,7 +15,6 @@ int restart_handler_register(struct restart_handler *); int restart_handler_register_fn(void (*restart_fn)(struct restart_handler *)); #define RESTART_DEFAULT_PRIORITY 100 -#define RESTART_DEFAULT_NAME "default" unsigned int of_get_restart_priority(struct device_node *node); |