log: uclass_get_name() depends on CONFIG_SPL_DM
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Mon, 8 Jun 2020 16:04:22 +0000 (18:04 +0200)
committerSimon Glass <sjg@chromium.org>
Fri, 10 Jul 2020 00:57:22 +0000 (18:57 -0600)
commit6c9e4175491900b9fa5d9283c4a449f00285162d
tree1b37e8f20cc9768c0b44f58e4a4562aeb7116ffe
parente85497a930b21cc5b2c5ac220c9ed1668341d30c
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>
common/log.c