fdt: remove fdtdec_get_alias_node() function
PATCH 1/1 fdt: remove fdtdec_get_alias_node() function
The fdt_path_offset() checks an alias too.
fdtdec_get_alias_node(blob, "foo") is equivalent to fdt_path_offset(blob, "foo").
---
drivers/serial/serial-uclass.c | 2 +- include/fdtdec.h | 11 ----------- lib/fdtdec.c | 15 --------------- 3 files changed, 1 insertion(+), 27 deletions(-)
drivers/serial/serial-uclass.c +1 -1
@@ -34,7 +34,7 @@ static void serial_find_console_or_panic(void)/* Check for a chosen console */ node =fdtdec_get_chosen_node (gd->fdt_blob,"stdout-path" );if (node <0 ) - node =fdtdec_get_alias_node (gd->fdt_blob,"console" ); + node =fdt_path_offset (gd->fdt_blob,"console" );if (!uclass_get_device_by_of_offset (UCLASS_SERIAL , node, &cur_dev))return ;
include/fdtdec.h +0 -11
@@ -388,17 +388,6 @@ int fdtdec_get_alias_seq(const void *blob, const char *base, int node, int *seqp);/** -* Get the offset of the given alias node -* -* This looks up an alias in /aliases then finds the offset of that node. -* -* @param blob Device tree blob (if NULL, then error is returned) -* @param name Alias name, e.g. "console" -* @return Node offset referred to by that alias, or -ve FDT_ERR_... -*/ -int fdtdec_get_alias_node (const void *blob,const char *name); - -/** * Get the offset of the given chosen node * * This looks up a property in /chosen containing the path to another node,
lib/fdtdec.c +0 -15
@@ -368,21 +368,6 @@ int fdtdec_get_alias_seq(const void *blob, const char *base, int offset,return -ENOENT ; } -int fdtdec_get_alias_node (const void *blob,const char *name) -{ -const char *prop; -int alias_node; -int len; - -if (!blob) -return -FDT_ERR_NOTFOUND ; - alias_node =fdt_path_offset (blob,"/aliases" ); - prop =fdt_getprop (blob, alias_node, name, &len); -if (!prop) -return -FDT_ERR_NOTFOUND ; -return fdt_path_offset (blob, prop); -} -int fdtdec_get_chosen_node (const void *blob,const char *name) {const char *prop;
Signature · 1 line
1.9.1
PATCH 1/1 fdt: remove fdtdec_get_alias_node() function
Quoted 5 lines · Masahiro Yamada
The
fdt_path_offset()checks an alias too.
fdtdec_get_alias_node(blob, "foo")is equivalent tofdt_path_offset(blob, "foo").
Quoted 7 lines
Signed-off-by Masahiro Yamada <[email protected]>---
drivers/serial/serial-uclass.c | 2 +- include/fdtdec.h | 11 ----------- lib/fdtdec.c | 15 --------------- 3 files changed, 1 insertion(+), 27 deletions(-)
Thanks!
PATCH 1/1 fdt: remove fdtdec_get_alias_node() function
Hi Masahiro,
Quoted 9 lines · Simon Glass
Quoted 8 lines · Masahiro Yamada
The
fdt_path_offset()checks an alias too.
fdtdec_get_alias_node(blob, "foo")is equivalent tofdt_path_offset(blob, "foo").Signed-off-by Masahiro Yamada <[email protected]>---
Quoted 8 lines
Quoted 4 lines
drivers/serial/serial-uclass.c | 2 +- include/fdtdec.h | 11 ----------- lib/fdtdec.c | 15 --------------- 3 files changed, 1 insertion(+), 27 deletions(-)Thanks!
Acked-by Simon Glass <[email protected]>
Applied to u-boot-fdt, thanks!
In case you are interested, these was added and removed before:
added: b5220bc fdt: add decode helper library
removed: 0087847 fdt: Remove fdtdec_find_alias_node() function
added: 3234aa4 fdt: Add a function to get the node offset of an alias
All three commits were written by me. Given that track record I will be due to add it again in 2016.
Regards,
Simon
PATCH 1/1 fdt: remove fdtdec_get_alias_node() function
Hi Simon,
Quoted 23 lines · On Thu, 27 Nov 2014 09:22:10 -0700 Simon Glass <[email protected]> wrote:
Hi Masahiro,
Quoted 9 lines · Simon Glass
Quoted 8 lines · Masahiro Yamada
The
fdt_path_offset()checks an alias too.
fdtdec_get_alias_node(blob, "foo")is equivalent tofdt_path_offset(blob, "foo").Signed-off-by Masahiro Yamada <[email protected]>---
Quoted 8 lines
Quoted 4 lines
drivers/serial/serial-uclass.c | 2 +- include/fdtdec.h | 11 ----------- lib/fdtdec.c | 15 --------------- 3 files changed, 1 insertion(+), 27 deletions(-)Thanks!
Acked-by Simon Glass <[email protected]>Applied to u-boot-fdt, thanks!
Quoted 8 lines
In case you are interested, these was added and removed before:
added: b5220bc fdt: add decode helper library
removed: 0087847 fdt: Removefdtdec_find_alias_node()function
added: 3234aa4 fdt: Add a function to get the node offset of an aliasAll three commits were written by me. Given that track record I will be due to add it again in 2016.
Oh dear, and then I will be due to remove it again in 2018.
Best Regards
Masahiro Yamada