]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
fdt: remove fdtdec_get_alias_node() function
authorMasahiro Yamada <yamada.m@jp.panasonic.com>
Fri, 21 Nov 2014 10:47:08 +0000 (19:47 +0900)
committerSimon Glass <sjg@chromium.org>
Thu, 27 Nov 2014 16:12:30 +0000 (09:12 -0700)
The fdt_path_offset() checks an alias too.

fdtdec_get_alias_node(blob, "foo") is equivalent to
fdt_path_offset(blob, "foo").

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
drivers/serial/serial-uclass.c
include/fdtdec.h
lib/fdtdec.c

index b09053f1402bdf55aa3c89abea593ab0bd82d2dd..d1b5777cecda13be6191404cefe6dcf82a92f564 100644 (file)
@@ -39,7 +39,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, &dev)) {
                gd->cur_serial_dev = dev;
                return;
index 3da9fab95ce8c10280a363e0590ec9e8135d5d3d..911f216cd8028031ab2e0c11a8fe24fb900d9534 100644 (file)
@@ -389,17 +389,6 @@ int fdtdec_add_aliases_for_id(const void *blob, const char *name,
 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
  *
index 7c7e673aeb79e975f0a725967eb298da4212d99d..f12d6a3e7da269d62548d6e9e66ec83999a0b565 100644 (file)
@@ -370,21 +370,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;