aboutsummaryrefslogtreecommitdiff
path: root/include/fdtdec.h
diff options
context:
space:
mode:
authorHeiko Stuebner2019-10-23 16:46:39 +0200
committerSimon Glass2019-11-14 07:09:34 -0600
commit357d2ceba0354e29462ac25924f5e42623c22b5b (patch)
treef03173ccfa5d3db2b6bb0d738590a9e37467fd39 /include/fdtdec.h
parent086336a22508affb7567bf6d383642554eda5a56 (diff)
fdtdec: only create phandle if caller wants it in fdtdec_add_reserved_memory()
The phandlep pointer returning the phandle to the caller is optional and if it is not set when calling fdtdec_add_reserved_memory() it is highly likely that the caller is not interested in a phandle to the created reserved-memory area and really just wants that area added. So just don't create a phandle in that case. Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/fdtdec.h')
-rw-r--r--include/fdtdec.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/fdtdec.h b/include/fdtdec.h
index e150975b276..696e0fd024d 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -1061,7 +1061,7 @@ static inline int fdtdec_set_phandle(void *blob, int node, uint32_t phandle)
* @param basename base name of the node to create
* @param carveout information about the carveout region
* @param phandlep return location for the phandle of the carveout region
- * can be NULL
+ * can be NULL if no phandle should be added
* @return 0 on success or a negative error code on failure
*/
int fdtdec_add_reserved_memory(void *blob, const char *basename,