diff --git a/clocks.c b/clocks.c
index 9a76c19..ac9aaf5 100644
--- a/clocks.c
+++ b/clocks.c
@@ -20,7 +20,7 @@
 static char clk_name[NAME_MAX];
 static int  bold[MAX_LINES];
 
-int init_clock_details(void)
+int init_clock_details(bool dump)
 {
 	char *path = debugfs_locate_mpoint();
 	struct stat buf;
@@ -80,7 +80,73 @@
 	return atoi(result);
 }
 
-void find_parents_for_clock(char *clkname, int complete)
+static void dump_parent(struct clock_info *clk, int line, bool dump)
+{
+	char *unit = "Hz";
+	double drate;
+	static char spaces[64];
+	char str[256];
+	static int maxline;
+
+	if (maxline < line)
+		maxline = line;
+
+	if (clk && clk->parent)
+		dump_parent(clk->parent, ++line, dump);
+
+	drate = (double)clk->rate;
+	if (drate > 1000 && drate < 1000000) {
+		unit = "KHz";
+		drate /= 1000;
+	}
+	if (drate > 1000000) {
+		unit = "MHz";
+		drate /= 1000000;
+	}
+	if (clk == clocks_info) {
+		line++;
+		strcpy(spaces, "");
+		sprintf(str, "%s%s (flags:%d,usecount:%d,rate:%5.2f %s)\n",
+			spaces, clk->name, clk->flags, clk->usecount, drate,
+			unit);
+	} else {
+		if (!(clk->parent == clocks_info))
+			strcat(spaces, "  ");
+		sprintf(str, "%s`- %s (flags:%d,usecount:%d,rate:%5.2f %s)\n",
+			spaces, clk->name, clk->flags, clk->usecount, drate,
+			unit);
+	}
+	if (dump)
+		//printf("line=%d:m%d:l%d %s", maxline - line + 2, maxline, line, str);
+		printf("%s", str);
+	else
+		print_one_clock(maxline - line + 2, str, 1, 0);
+}
+
+static void dump_all_parents(char *clkarg, bool dump)
+{
+	struct clock_info *clk;
+	char spaces[1024];
+
+	strcpy(spaces, "");
+
+	clk = find_clock(clocks_info, clkarg);
+
+	if (!clk)
+		printf("Clock NOT found!\n");
+	else {
+		/* while(clk && clk != clocks_info) { */
+		/* 	printf("%s\n", clk->name); */
+		/* 	strcat(spaces, "  "); */
+		/* 	clk = clk->parent; */
+		/* 	printf("%s <-- ", spaces); */
+		/* } */
+		/* printf("  /\n"); */
+		dump_parent(clk, 1, dump);
+	}
+}
+
+void find_parents_for_clock(char *clkname, int complete, bool dump)
 {
 	char name[256];
 
@@ -95,7 +161,7 @@
 	}
 	sprintf(name, "Parents for \"%s\" Clock : \n", clkname);
 	print_one_clock(0, name, 1, 1);
-	dump_all_parents(clkname);
+	dump_all_parents(clkname, dump);
 }
 
 int read_and_print_clock_info(int verbose, int hrow, int selected)
@@ -261,11 +327,11 @@
 	}
 }
 
-void read_and_dump_clock_info_one(char *clk)
+void read_and_dump_clock_info_one(char *clk, bool dump)
 {
 	printf("\nParents for \"%s\" Clock :\n\n", clk);
 	read_clock_info(clk_dir_path);
-	dump_all_parents(clk);
+	dump_all_parents(clk, dump);
 	printf("\n\n");
 }
 
@@ -395,72 +461,6 @@
 	(*parent)->num_children++;
 }
 
-void dump_parent(struct clock_info *clk, int line)
-{
-	char *unit = "Hz";
-	double drate;
-	static char spaces[64];
-	char str[256];
-	static int maxline;
-
-	if (maxline < line)
-		maxline = line;
-
-	if (clk && clk->parent)
-		dump_parent(clk->parent, ++line);
-
- 	drate = (double)clk->rate;
-	if (drate > 1000 && drate < 1000000) {
-		unit = "KHz";
-		drate /= 1000;
-	}
-	if (drate > 1000000) {
-		unit = "MHz";
-		drate /= 1000000;
-	}
-	if (clk == clocks_info) {
-		line++;
-		strcpy(spaces, "");
-		sprintf(str, "%s%s (flags:%d,usecount:%d,rate:%5.2f %s)\n",
-			spaces, clk->name, clk->flags, clk->usecount, drate,
-			unit);
-	} else {
-		if (!(clk->parent == clocks_info))
-			strcat(spaces, "  ");
-		sprintf(str, "%s`- %s (flags:%d,usecount:%d,rate:%5.2f %s)\n",
-			spaces, clk->name, clk->flags, clk->usecount, drate,
-			unit);
-	}
-	if (dump)
-		//printf("line=%d:m%d:l%d %s", maxline - line + 2, maxline, line, str);
-		printf("%s", str);
-	else
-		print_one_clock(maxline - line + 2, str, 1, 0);
-}
-
-void dump_all_parents(char *clkarg)
-{
-	struct clock_info *clk;
-	char spaces[1024];
-
-	strcpy(spaces, "");
-
-	clk = find_clock(clocks_info, clkarg);
-
-	if (!clk)
-		printf("Clock NOT found!\n");
-	else {
-//		while(clk && clk != clocks_info) {
-//			printf("%s\n", clk->name);
-//			strcat(spaces, "  ");
-//			clk = clk->parent;
-//			printf("%s <-- ", spaces);
-//		}
-//		printf("  /\n");
-		dump_parent(clk, 1);
-	}
-}
-
 struct clock_info *find_clock(struct clock_info *clk, char *clkarg)
 {
 	int i;
diff --git a/clocks.h b/clocks.h
index a240b72..4b176d0 100644
--- a/clocks.h
+++ b/clocks.h
@@ -51,5 +51,4 @@
 void destroy_clocks_info(void);
 void destroy_clocks_info_recur(struct clock_info *clock);
 void collapse_all_subclocks(struct clock_info *clock);
-void dump_all_parents(char *clkarg);
 struct clock_info *find_clock(struct clock_info *clk, char *clkarg);
diff --git a/powerdebug.c b/powerdebug.c
index ca19a29..380803c 100644
--- a/powerdebug.c
+++ b/powerdebug.c
@@ -17,7 +17,7 @@
 #include <stdbool.h>
 #include "powerdebug.h"
 
-bool dump = false;
+static bool dump = false;
 int highlighted_row;
 int selectedwindow = -1;
 
@@ -275,7 +275,7 @@
 		if (options->clocks || selectedwindow == CLOCK) {
 			int ret = 0;
 			if (firsttime[CLOCK]) {
-				ret = init_clock_details();
+				ret = init_clock_details(dump);
 				if (!ret)
 					firsttime[CLOCK] = 0;
 				strcpy(clkname_str, "");
@@ -299,11 +299,11 @@
 					enter_hit = false;
 				} else
 					find_parents_for_clock(clkname_str,
-							enter_hit);
+							       enter_hit, dump);
 			}
 			if (!ret && dump) {
 				if (options->findparent)
-					read_and_dump_clock_info_one(options->clkarg);
+					read_and_dump_clock_info_one(options->clkarg, dump);
 				else
 					read_and_dump_clock_info(options->verbose);
 			}
diff --git a/powerdebug.h b/powerdebug.h
index e87932e..9fd18a5 100644
--- a/powerdebug.h
+++ b/powerdebug.h
@@ -33,7 +33,6 @@
 extern int selectedwindow;
 
 extern int numregulators;
-extern bool dump;
 
 extern int init_regulator_ds(void);
 extern void print_regulator_info(int verbose);
@@ -41,17 +40,17 @@
 extern void print_regulator_info(int verbose);
 
 extern void read_and_dump_clock_info(int verbose);
-extern void read_and_dump_clock_info_one(char *clk);
+extern void read_and_dump_clock_info_one(char *clk, bool dump);
 extern void read_clock_info(char *clkpath);
 extern struct clock_info *read_clock_info_recur(char *clkpath, int level,
 						struct clock_info *parent);
 extern void dump_clock_info(struct clock_info *clk, int level, int bmp);
 extern void insert_children(struct clock_info **parent, struct clock_info *clk);
-extern void find_parents_for_clock(char *clkname, int complete);
+extern void find_parents_for_clock(char *clkname, int complete, bool dump);
 extern int  read_and_print_clock_info(int verbose, int hrow, int selected);
 extern void print_clock_info(int verbose, int hrow, int selected);
 extern void print_string_val(char *name, char *val);
-extern int  init_clock_details(void);
+extern int  init_clock_details(bool dump);
 extern void print_clock_header(void);
 extern void print_one_clock(int line, char *str, int bold, int highlight);
 extern char *debugfs_locate_mpoint(void);
