Move the corresponding functions to the right header file and
rename the function with <subsystem>_function_name.

Signed-off-by: Daniel Lezcano <daniel.lezc...@free.fr>
---
 powerdebug.c |    4 ++--
 powerdebug.h |    4 ----
 regulator.c  |    8 ++++----
 regulator.h  |    2 ++
 4 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/powerdebug.c b/powerdebug.c
index fa26e77..0469eb8 100644
--- a/powerdebug.c
+++ b/powerdebug.c
@@ -261,13 +261,13 @@ int mainloop(struct powerdebug_options *options)
                }
 
                if (options->regulators || options->selectedwindow == 
REGULATOR) {
-                       read_regulator_info();
+                       regulator_read_info();
                        if (!options->dump) {
                                create_selectedwindow(options->selectedwindow);
                                show_regulator_info(options->verbose);
                        }
                        else
-                               print_regulator_info(options->verbose);
+                               regulator_print_info(options->verbose);
                }
 
                if (options->clocks || options->selectedwindow == CLOCK) {
diff --git a/powerdebug.h b/powerdebug.h
index 42add86..d04cfce 100644
--- a/powerdebug.h
+++ b/powerdebug.h
@@ -32,10 +32,6 @@ extern struct regulator_info *regulators_info;
 
 extern int numregulators;
 
-extern void print_regulator_info(int verbose);
-extern void read_regulator_info(void);
-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, bool dump);
 extern void read_clock_info(char *clkpath);
diff --git a/regulator.c b/regulator.c
index 395571b..255a56d 100644
--- a/regulator.c
+++ b/regulator.c
@@ -42,14 +42,14 @@ int regulator_init(void)
        return(0);
 }
 
-void print_string_val(char *name, char *val)
+static void print_string_val(char *name, char *val)
 {
        printf("\t%s=%s", name, val);
        if (!strchr(val, '\n'))
                printf("\n");
 }
 
-void print_regulator_info(int verbose)
+void regulator_print_info(int verbose)
 {
        int i;
 
@@ -109,7 +109,7 @@ void print_regulator_info(int verbose)
        printf("\n\n");
 }
 
-void read_info_from_dirent(struct dirent *ritem, char *str, int idx)
+static void read_info_from_dirent(struct dirent *ritem, char *str, int idx)
 {
        if (!strcmp(ritem->d_name, "name"))
                strcpy(regulators_info[idx].name, str);
@@ -143,7 +143,7 @@ void read_info_from_dirent(struct dirent *ritem, char *str, 
int idx)
                regulators_info[idx].num_users = atoi(str);
 }
 
-int read_regulator_info(void)
+int regulator_read_info(void)
 {
        FILE *file = NULL;
        DIR *regdir, *dir;
diff --git a/regulator.h b/regulator.h
index b6780ab..bda46fd 100644
--- a/regulator.h
+++ b/regulator.h
@@ -41,3 +41,5 @@ struct regulator_info {
 } *regulators_info;
 
 extern int regulator_init(void);
+extern int regulator_read_info(void);
+extern void regulator_print_info(int verbose);
-- 
1.7.1


_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev

Reply via email to