aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@free.fr>2011-03-26 22:05:57 +0100
committerAmit Kucheria <amit.kucheria@linaro.org>2011-04-04 02:22:36 +0300
commit691d5569d54cbd42531d65f1fe1852d8ea3512bd (patch)
tree869a20bf5ea45cf9168f8fd52848e0a5bd2169cd
parent3bd64f022ad54728413a3f2da6a732a70df5b678 (diff)
downloadpowerdebug-691d5569d54cbd42531d65f1fe1852d8ea3512bd.tar.gz
make regulators_info static in powerdebug.c
As no function rely on the global variable regulators_info, let's make it static and reduce the scope to powerdebug.c Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr> Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
-rw-r--r--powerdebug.c2
-rw-r--r--powerdebug.h4
-rw-r--r--regulator.h2
3 files changed, 5 insertions, 3 deletions
diff --git a/powerdebug.c b/powerdebug.c
index 15194da..7d91845 100644
--- a/powerdebug.c
+++ b/powerdebug.c
@@ -20,6 +20,8 @@
int highlighted_row;
+static struct regulator_info *regulators_info;
+
void usage(void)
{
printf("Usage: powerdebug [OPTIONS]\n");
diff --git a/powerdebug.h b/powerdebug.h
index ac2b042..e92049a 100644
--- a/powerdebug.h
+++ b/powerdebug.h
@@ -28,8 +28,6 @@
enum {CLOCK, REGULATOR, SENSOR};
enum {CLOCK_SELECTED = 1, REFRESH_WINDOW};
-extern struct regulator_info *regulators_info;
-
extern int numregulators;
extern void read_and_dump_clock_info(int verbose);
@@ -58,4 +56,6 @@ extern void killall_windows(int all);
extern void show_header(int selectedwindow);
extern void create_windows(int selectedwindow);
extern void create_selectedwindow(int selectedwindow);
+
+struct regulator_info;
extern void show_regulator_info(struct regulator_info *reg_info, int verbose);
diff --git a/regulator.h b/regulator.h
index 115780e..814691e 100644
--- a/regulator.h
+++ b/regulator.h
@@ -38,7 +38,7 @@ struct regulator_info {
int max_microamps;
int requested_microamps;
int num_users;
-} *regulators_info;
+};
extern struct regulator_info *regulator_init(int *nr_regulators);
extern int regulator_read_info(struct regulator_info *reg_info);