mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-18 06:38:15 +01:00
dm: ofnode: Fix compile breakage with OF_CHECKS enabled
Include missing log.h and change _ofnode_to_np() to ofnode_to_np() so that compiling with OF_CHECKS enabled does not break. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
e9b6b2c77d
commit
45dbe75da6
@ -10,6 +10,7 @@
|
|||||||
/* TODO(sjg@chromium.org): Drop fdtdec.h include */
|
/* TODO(sjg@chromium.org): Drop fdtdec.h include */
|
||||||
#include <fdtdec.h>
|
#include <fdtdec.h>
|
||||||
#include <dm/of.h>
|
#include <dm/of.h>
|
||||||
|
#include <log.h>
|
||||||
|
|
||||||
/* Enable checks to protect against invalid calls */
|
/* Enable checks to protect against invalid calls */
|
||||||
#undef OF_CHECKS
|
#undef OF_CHECKS
|
||||||
@ -84,7 +85,7 @@ struct ofprop {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* _ofnode_to_np() - convert an ofnode to a live DT node pointer
|
* ofnode_to_np() - convert an ofnode to a live DT node pointer
|
||||||
*
|
*
|
||||||
* This cannot be called if the reference contains an offset.
|
* This cannot be called if the reference contains an offset.
|
||||||
*
|
*
|
||||||
@ -182,8 +183,8 @@ static inline bool ofnode_is_np(ofnode node)
|
|||||||
* live tree is in use.
|
* live tree is in use.
|
||||||
*/
|
*/
|
||||||
assert(!ofnode_valid(node) ||
|
assert(!ofnode_valid(node) ||
|
||||||
(of_live_active() ? _ofnode_to_np(node)
|
(of_live_active() ? ofnode_to_np(node)
|
||||||
: _ofnode_to_np(node)));
|
: ofnode_to_np(node)));
|
||||||
#endif
|
#endif
|
||||||
return of_live_active() && ofnode_valid(node);
|
return of_live_active() && ofnode_valid(node);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user