diff options
author | Tom Rini <trini@konsulko.com> | 2021-08-09 09:27:06 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-08-09 09:27:06 -0400 |
commit | 0dec2030ccc686eae4616d1ce57d41eaed15685e (patch) | |
tree | 5e9a34e4d51c4587a2138a2de969361ad3ec1f2c /drivers/core | |
parent | 3823315cbedf930c52fe77452063ab6d62b157be (diff) | |
parent | e679f39f7fc3eb083b2f957d748f81bbdc28f28c (diff) |
Merge tag 'dm-pull-8aug21' of https://source.denx.de/u-boot/custodians/u-boot-dm
Use log subsystem for dm_warn()
Various minor bug fixes
Diffstat (limited to 'drivers/core')
-rw-r--r-- | drivers/core/uclass.c | 3 | ||||
-rw-r--r-- | drivers/core/util.c | 11 |
2 files changed, 3 insertions, 11 deletions
diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c index 117d35ac49..3146dfd032 100644 --- a/drivers/core/uclass.c +++ b/drivers/core/uclass.c @@ -146,6 +146,9 @@ int uclass_get(enum uclass_id id, struct uclass **ucp) { struct uclass *uc; + /* Immediately fail if driver model is not set up */ + if (!gd->uclass_root) + return -EDEADLK; *ucp = NULL; uc = uclass_find(id); if (!uc) { diff --git a/drivers/core/util.c b/drivers/core/util.c index 91e93b0cf1..5be4ee79de 100644 --- a/drivers/core/util.c +++ b/drivers/core/util.c @@ -11,17 +11,6 @@ #include <linux/libfdt.h> #include <vsprintf.h> -#if CONFIG_IS_ENABLED(DM_WARN) -void dm_warn(const char *fmt, ...) -{ - va_list args; - - va_start(args, fmt); - vprintf(fmt, args); - va_end(args); -} -#endif - int list_count_items(struct list_head *head) { struct list_head *node; |