mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 13:11:31 +00:00
log: uclass_get_name() depends on CONFIG_SPL_DM
If CONFIG_SPL_DM=n and CONFIG_SPL_LOG=y a build error occurs: ld.bfd: common/built-in.o: in function `log_get_cat_name': common/log.c:48: undefined reference to `uclass_get_name' make[1]: *** [scripts/Makefile.spl:422: spl/u-boot-spl] Error 1 Call uclass_get_name() only if DM is enabled. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
e85497a930
commit
6c9e417549
1 changed files with 4 additions and 0 deletions
|
@ -45,7 +45,11 @@ const char *log_get_cat_name(enum log_category_t cat)
|
|||
if (cat >= LOGC_NONE)
|
||||
return log_cat_name[cat - LOGC_NONE];
|
||||
|
||||
#if CONFIG_IS_ENABLED(DM)
|
||||
name = uclass_get_name((enum uclass_id)cat);
|
||||
#else
|
||||
name = NULL;
|
||||
#endif
|
||||
|
||||
return name ? name : "<missing>";
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue