diff mbox

[U-Boot,v2,03/11] fdt: Export the fdt_find_or_add_subnode() function

Message ID 1414112337-22735-3-git-send-email-sjg@chromium.org
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass Oct. 24, 2014, 12:58 a.m. UTC
This function is useful for ensuring that a node exists. Export it so it
can be used more widely.

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

Changes in v2:
- Leave function documentation hidden in the C file

 common/fdt_support.c  | 6 +++---
 include/fdt_support.h | 2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)

Comments

Anatolij Gustschin Oct. 24, 2014, 4:48 p.m. UTC | #1
On Thu, 23 Oct 2014 18:58:49 -0600
Simon Glass <sjg@chromium.org> wrote:

> This function is useful for ensuring that a node exists. Export it so it
> can be used more widely.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
> Changes in v2:
> - Leave function documentation hidden in the C file
> 
>  common/fdt_support.c  | 6 +++---
>  include/fdt_support.h | 2 ++
>  2 files changed, 5 insertions(+), 3 deletions(-)

Acked-by: Anatolij Gustschin <agust@denx.de>

Thanks,

Anatolij
Tom Rini Oct. 24, 2014, 6:05 p.m. UTC | #2
On Thu, Oct 23, 2014 at 06:58:49PM -0600, Simon Glass wrote:

> This function is useful for ensuring that a node exists. Export it so it
> can be used more widely.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Tom Rini <trini@ti.com>
Simon Glass Nov. 21, 2014, 3:24 a.m. UTC | #3
On 24 October 2014 20:05, Tom Rini <trini@ti.com> wrote:
> On Thu, Oct 23, 2014 at 06:58:49PM -0600, Simon Glass wrote:
>
>> This function is useful for ensuring that a node exists. Export it so it
>> can be used more widely.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>
> Reviewed-by: Tom Rini <trini@ti.com>

Applied to u-boot-fdt.
diff mbox

Patch

diff --git a/common/fdt_support.c b/common/fdt_support.c
index 3f64156..46a15e7 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -113,7 +113,8 @@  int fdt_find_and_setprop(void *fdt, const char *node, const char *prop,
 }
 
 /**
- * fdt_find_or_add_subnode - find or possibly add a subnode of a given node
+ * fdt_find_or_add_subnode() - find or possibly add a subnode of a given node
+ *
  * @fdt: pointer to the device tree blob
  * @parentoffset: structure block offset of a node
  * @name: name of the subnode to locate
@@ -121,8 +122,7 @@  int fdt_find_and_setprop(void *fdt, const char *node, const char *prop,
  * fdt_subnode_offset() finds a subnode of the node with a given name.
  * If the subnode does not exist, it will be created.
  */
-static int fdt_find_or_add_subnode(void *fdt, int parentoffset,
-				   const char *name)
+int fdt_find_or_add_subnode(void *fdt, int parentoffset, const char *name)
 {
 	int offset;
 
diff --git a/include/fdt_support.h b/include/fdt_support.h
index 41ce535..e17e609 100644
--- a/include/fdt_support.h
+++ b/include/fdt_support.h
@@ -64,6 +64,8 @@  static inline void fdt_fixup_crypto_node(void *blob, int sec_rev) {}
 int fdt_pci_dma_ranges(void *blob, int phb_off, struct pci_controller *hose);
 #endif
 
+int fdt_find_or_add_subnode(void *fdt, int parentoffset, const char *name);
+
 /**
  * Add board-specific data to the FDT before booting the OS.
  *