summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cpukit/dtc/libfdt/fdt_ro.c12
-rw-r--r--cpukit/include/libfdt.h12
2 files changed, 11 insertions, 13 deletions
diff --git a/cpukit/dtc/libfdt/fdt_ro.c b/cpukit/dtc/libfdt/fdt_ro.c
index 817ac39099..2c393a100b 100644
--- a/cpukit/dtc/libfdt/fdt_ro.c
+++ b/cpukit/dtc/libfdt/fdt_ro.c
@@ -172,18 +172,6 @@ int fdt_find_max_phandle(const void *fdt, uint32_t *phandle)
return 0;
}
-uint32_t fdt_get_max_phandle(const void *fdt)
-{
- uint32_t phandle;
- int err;
-
- err = fdt_find_max_phandle(fdt, &phandle);
- if (err < 0)
- return (uint32_t)-1;
-
- return phandle;
-}
-
int fdt_generate_phandle(const void *fdt, uint32_t *phandle)
{
uint32_t max;
diff --git a/cpukit/include/libfdt.h b/cpukit/include/libfdt.h
index 39ff6d5d25..1f44177f34 100644
--- a/cpukit/include/libfdt.h
+++ b/cpukit/include/libfdt.h
@@ -418,7 +418,17 @@ int fdt_find_max_phandle(const void *fdt, uint32_t *phandle);
* 0, if no phandle was found in the device tree
* -1, if an error occurred
*/
-uint32_t fdt_get_max_phandle(const void *fdt);
+static inline uint32_t fdt_get_max_phandle(const void *fdt)
+{
+ uint32_t phandle;
+ int err;
+
+ err = fdt_find_max_phandle(fdt, &phandle);
+ if (err < 0)
+ return (uint32_t)-1;
+
+ return phandle;
+}
/**
* fdt_generate_phandle - return a new, unused phandle for a device tree blob