aboutsummaryrefslogtreecommitdiff
path: root/clocks.c
diff options
context:
space:
mode:
Diffstat (limited to 'clocks.c')
-rw-r--r--clocks.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/clocks.c b/clocks.c
index ecc72ea..8a2dc97 100644
--- a/clocks.c
+++ b/clocks.c
@@ -19,6 +19,7 @@
#include "powerdebug.h"
#include "clocks.h"
+#include "tree.h"
#define MAX_LINES 120
@@ -41,6 +42,8 @@ struct clock_info {
struct clock_info **children;
} *clocks_info;
+static struct tree *clock_tree;
+
static int locate_debugfs(char *clk_path)
{
const char *mtab = "/proc/mounts";
@@ -73,6 +76,10 @@ int clock_init(void)
sprintf(clk_dir_path, "%s/clock", clk_dir_path);
+ clock_tree = tree_load(clk_dir_path, NULL);
+ if (!clock_tree)
+ return -1;
+
return access(clk_dir_path, F_OK);
}