change regulator init function

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

Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
diff --git a/powerdebug.c b/powerdebug.c
index 2f0992b..fa26e77 100644
--- a/powerdebug.c
+++ b/powerdebug.c
@@ -15,6 +15,7 @@
 
 #include <getopt.h>
 #include <stdbool.h>
+#include "regulator.h"
 #include "powerdebug.h"
 
 int highlighted_row;
@@ -352,7 +353,7 @@
 		return 1;
 	}
 
-	if (init_regulator_ds())
+	if (regulator_init())
 		return 1;
 
 	if (mainloop(options))
diff --git a/powerdebug.h b/powerdebug.h
index cef5570..42add86 100644
--- a/powerdebug.h
+++ b/powerdebug.h
@@ -32,7 +32,6 @@
 
 extern int numregulators;
 
-extern int init_regulator_ds(void);
 extern void print_regulator_info(int verbose);
 extern void read_regulator_info(void);
 extern void print_regulator_info(int verbose);
diff --git a/regulator.c b/regulator.c
index 18c9777..395571b 100644
--- a/regulator.c
+++ b/regulator.c
@@ -15,7 +15,7 @@
 
 #include "regulator.h"
 
-int init_regulator_ds(void)
+int regulator_init(void)
 {
 	DIR *regdir;
 	struct dirent *item;
diff --git a/regulator.h b/regulator.h
index 3ecf6b8..b6780ab 100644
--- a/regulator.h
+++ b/regulator.h
@@ -40,4 +40,4 @@
 	int num_users;
 } *regulators_info;
 
-extern int numregulators;
+extern int regulator_init(void);