Initialize tree pointers in the dump only option
The regulator, gpio, sensor and clock tree pointers were
initialized only during the display option and not during the
dump only option. This meant the dump option was not printing
any info previously. This patch fixes it by initilaizing the
tree pointers during the dump only option.
Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
diff --git a/clocks.c b/clocks.c
index c115d8e..4b2a11c 100644
--- a/clocks.c
+++ b/clocks.c
@@ -459,8 +459,13 @@
{
int ret;
- if (read_clock_info(clock_tree))
- return -1;
+ if (!clock_tree) {
+ if (clock_info_load())
+ return -1;
+ } else {
+ if (read_clock_info(clock_tree))
+ return -1;
+ }
if (clk) {
printf("\nParents for \"%s\" Clock :\n\n", clk);