[PATCH 09/16] of: remove unused barebox_fdt

Sascha Hauer s.hauer at pengutronix.de
Fri Jan 11 08:24:29 EST 2013


barebox_fdt should once become the pointer to the barebox internal
devicetree. Since barebox has its own internal devicetree format
this was never used. remove it.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 commands/oftree.c |    9 +--------
 common/oftree.c   |    2 --
 include/of.h      |    2 --
 3 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/commands/oftree.c b/commands/oftree.c
index b9d3c7b..17af9eb 100644
--- a/commands/oftree.c
+++ b/commands/oftree.c
@@ -62,8 +62,6 @@ static int do_oftree(int argc, char *argv[])
 			}
 			break;
 		case 'f':
-			free(barebox_fdt);
-			barebox_fdt = NULL;
 			return 0;
 		case 'n':
 			node = optarg;
@@ -88,12 +86,7 @@ static int do_oftree(int argc, char *argv[])
 			fdt_print(fdt, node);
 			free(fdt);
 		} else {
-			if (barebox_fdt) {
-				fdt_print(barebox_fdt, node);
-				return 0;
-			} else {
-				return 1;
-			}
+			return 1;
 		}
 		return 0;
 	}
diff --git a/common/oftree.c b/common/oftree.c
index 0dd6d5c..d699cb6 100644
--- a/common/oftree.c
+++ b/common/oftree.c
@@ -246,8 +246,6 @@ int fdt_get_path_or_create(struct fdt_header *fdt, const char *path)
 	return nodeoffset;
 }
 
-struct fdt_header *barebox_fdt;
-
 static int of_fixup_bootargs(struct fdt_header *fdt)
 {
 	int nodeoffset;
diff --git a/include/of.h b/include/of.h
index 80ec447..e1a778d 100644
--- a/include/of.h
+++ b/include/of.h
@@ -5,8 +5,6 @@
 #include <errno.h>
 #include <asm/byteorder.h>
 
-extern struct fdt_header *barebox_fdt;
-
 int fdt_print(struct fdt_header *working_fdt, const char *pathp);
 
 struct fdt_header *of_get_fixed_tree(struct fdt_header *fdt);
-- 
1.7.10.4




More information about the barebox mailing list