diff options
Diffstat (limited to 'common/bbu.c')
-rw-r--r-- | common/bbu.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/common/bbu.c b/common/bbu.c index 3974bf6729..fabd949664 100644 --- a/common/bbu.c +++ b/common/bbu.c @@ -99,7 +99,7 @@ int bbu_confirm(struct bbu_data *data) return -EINTR; } -static struct bbu_handler *bbu_find_handler(const char *name) +struct bbu_handler *bbu_find_handler_by_name(const char *name) { struct bbu_handler *handler; @@ -117,7 +117,7 @@ static struct bbu_handler *bbu_find_handler(const char *name) return NULL; } -static struct bbu_handler *bbu_find_handler_by_device(const char *devicepath) +struct bbu_handler *bbu_find_handler_by_device(const char *devicepath) { struct bbu_handler *handler; @@ -140,20 +140,6 @@ static struct bbu_handler *bbu_find_handler_by_device(const char *devicepath) return NULL; } -bool barebox_update_handler_exists(struct bbu_data *data) -{ - struct bbu_handler *handler; - - handler = bbu_find_handler_by_device(data->devicefile); - if (handler) - return true; - - if (!data->handler_name) - return false; - - return bbu_find_handler(data->handler_name) != NULL; -} - static int bbu_check_of_compat(struct bbu_data *data) { struct device_node *root_node; @@ -238,7 +224,7 @@ int barebox_update(struct bbu_data *data) handler = bbu_find_handler_by_device(data->devicefile); if (!handler) - handler = bbu_find_handler(data->handler_name); + handler = bbu_find_handler_by_name(data->handler_name); if (!handler) return -ENODEV; @@ -292,11 +278,11 @@ void bbu_handlers_list(void) */ int bbu_register_handler(struct bbu_handler *handler) { - if (bbu_find_handler(handler->name)) + if (bbu_find_handler_by_name(handler->name)) return -EBUSY; if (handler->flags & BBU_HANDLER_FLAG_DEFAULT && - bbu_find_handler(NULL)) + bbu_find_handler_by_name(NULL)) return -EBUSY; list_add_tail(&handler->list, &bbu_image_handlers); |