diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-07-27 07:41:48 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-07-27 07:41:52 +0200 |
commit | b2acebc742c5d7266c6c69cc5e188ce967775138 (patch) | |
tree | 1a114d1bd2a1445f8c6809ed40dbdcb8d884c65d /drivers/of | |
parent | e72c88e71b64b2ef7061656be144738f7bf8ccb9 (diff) | |
download | barebox-b2acebc742c5d7266c6c69cc5e188ce967775138.tar.gz barebox-b2acebc742c5d7266c6c69cc5e188ce967775138.tar.xz |
of: Use dts syntax when printing devicetrees
Our devicetree printing is close to correct dts syntax, so fix
some remaining differences:
- Use an equal sign instead of a colon to separate a poperty name and
a value
- Add a semicolon at the end of properties
- Make sure we do not print a separator for empty properties
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/base.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c index 769b6426d0..881ac3b368 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -1475,9 +1475,12 @@ void of_print_nodes(struct device_node *node, int indent) list_for_each_entry(p, &node->properties, list) { for (i = 0; i < indent + 1; i++) printf("\t"); - printf("%s: ", p->name); - of_print_property(p->value, p->length); - printf("\n"); + printf("%s", p->name); + if (p->length) { + printf(" = "); + of_print_property(p->value, p->length); + } + printf(";\n"); } list_for_each_entry(n, &node->children, parent_list) { |