[20/28] remove unused code and parameter for clock dump function

Message ID 1308256197-29155-20-git-send-email-daniel.lezcano@linaro.org
State Accepted
Headers show

Commit Message

Daniel Lezcano June 16, 2011, 8:29 p.m.
the verbose option is unused.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 clocks.c     |   24 +++++++++++-------------
 powerdebug.c |    9 ++-------
 powerdebug.h |    3 +--
 3 files changed, 14 insertions(+), 22 deletions(-)

Patch

diff --git a/clocks.c b/clocks.c
index 5bcef51..9d8108c 100644
--- a/clocks.c
+++ b/clocks.c
@@ -567,20 +567,18 @@  out:
 	return ret;
 }
 
-void read_and_dump_clock_info_one(char *clk)
+void read_and_dump_clock_info(char *clk)
 {
-	printf("\nParents for \"%s\" Clock :\n\n", clk);
 	read_clock_info(clk_dir_path);
-	dump_all_parents(clk);
-	printf("\n\n");
-}
 
-void read_and_dump_clock_info(int verbose)
-{
-	(void)verbose;
-	printf("\nClock Tree :\n");
-	printf("**********\n");
-	read_clock_info(clk_dir_path);
-	dump_clock_info();
-	printf("\n\n");
+	if (clk) {
+		printf("\nParents for \"%s\" Clock :\n\n", clk);
+		dump_all_parents(clk);
+		printf("\n\n");
+	} else {
+		printf("\nClock Tree :\n");
+		printf("**********\n");
+		dump_clock_info();
+		printf("\n\n");
+	}
 }
diff --git a/powerdebug.c b/powerdebug.c
index f71a9df..71c37f2 100644
--- a/powerdebug.c
+++ b/powerdebug.c
@@ -310,13 +310,8 @@  static int powerdebug_dump(struct powerdebug_options *options,
 		regulator_print_info(reg_info, nr_reg, options->verbose);
 	}
 
-	if (options->clocks) {
-
-		if (options->clkname)
-			read_and_dump_clock_info_one(options->clkname);
-		else
-			read_and_dump_clock_info(options->verbose);
-	}
+	if (options->clocks)
+		read_and_dump_clock_info(options->clkname);
 
 	if (options->sensors)
 		read_and_print_sensor_info(options->verbose);
diff --git a/powerdebug.h b/powerdebug.h
index 8e0c658..d2c0954 100644
--- a/powerdebug.h
+++ b/powerdebug.h
@@ -28,8 +28,7 @@ 
 enum {CLOCK, REGULATOR, SENSOR};
 enum {CLOCK_SELECTED = 1, REFRESH_WINDOW};
 
-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(char *clk);
 extern int read_clock_info(char *clkpath);
 extern void find_parents_for_clock(char *clkname, int complete);
 extern int  read_and_print_clock_info(int verbose, int hrow, int selected);