diff mbox

[U-Boot,6/6] libfdt: Drop inlining of fdt_path_offset()

Message ID 1475452771-16230-7-git-send-email-sjg@chromium.org
State Accepted
Commit 42b7600d62ae288a8c12431d232b89b26ec61721
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass Oct. 2, 2016, 11:59 p.m. UTC
The fdt_path_offset() function is not inlined in upstream libfdt. Adjust
U-Boot's version to match.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 include/libfdt.h    | 5 +----
 lib/libfdt/fdt_ro.c | 5 +++++
 2 files changed, 6 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/include/libfdt.h b/include/libfdt.h
index 398748c..8746790 100644
--- a/include/libfdt.h
+++ b/include/libfdt.h
@@ -410,10 +410,7 @@  int fdt_path_offset_namelen(const void *fdt, const char *path, int namelen);
  *	-FDT_ERR_BADSTRUCTURE,
  *	-FDT_ERR_TRUNCATED, standard meanings.
  */
-static inline int fdt_path_offset(const void *fdt, const char *path)
-{
-	return fdt_path_offset_namelen(fdt, path, strlen(path));
-}
+int fdt_path_offset(const void *fdt, const char *path);
 
 /**
  * fdt_get_name - retrieve the name of a given node
diff --git a/lib/libfdt/fdt_ro.c b/lib/libfdt/fdt_ro.c
index e38aaa4..7e894b7 100644
--- a/lib/libfdt/fdt_ro.c
+++ b/lib/libfdt/fdt_ro.c
@@ -204,6 +204,11 @@  int fdt_path_offset_namelen(const void *fdt, const char *path, int namelen)
 	return offset;
 }
 
+int fdt_path_offset(const void *fdt, const char *path)
+{
+	return fdt_path_offset_namelen(fdt, path, strlen(path));
+}
+
 const char *fdt_get_name(const void *fdt, int nodeoffset, int *len)
 {
 	const struct fdt_node_header *nh = _fdt_offset_ptr(fdt, nodeoffset);