emul: Add messages in emul_init_for_bus_from_list
Add a log message to indicate that a new emulator is attached. Also add a message in the assert to make it clearer what has gone wrong. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
a1d8e55cad
commit
4d77edd6ba
|
@ -46,10 +46,12 @@ int emul_init_for_bus_from_list(const struct device *dev,
|
|||
const struct emul_link_for_bus *const end =
|
||||
cfg->children + cfg->num_children;
|
||||
|
||||
LOG_INF("Registering %d emulator(s) for %s", cfg->num_children,
|
||||
dev->name);
|
||||
for (elp = cfg->children; elp < end; elp++) {
|
||||
const struct emul *emul = emul_find_by_link(elp);
|
||||
|
||||
__ASSERT_NO_MSG(emul);
|
||||
__ASSERT(emul, "Cannot find emulator for '%s'", elp->label);
|
||||
|
||||
int rc = emul->init(emul, dev);
|
||||
|
||||
|
|
Loading…
Reference in a new issue