Correct the format type for reading in regulator data
Some of the regulator info were being read in as an integer
to a character buffer which was causing the info to be garbled and
wrong. This patch fixes the issue by reading in the info as a string
and then converting it into integer.
Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
diff --git a/regulator.c b/regulator.c
index b452f2b..ae0107f 100644
--- a/regulator.c
+++ b/regulator.c
@@ -66,10 +66,10 @@
{ "status", "%s", "\tstatus: %s\n" },
{ "state", "%s", "\tstate: %s\n" },
{ "type", "%s", "\ttype: %s\n" },
- { "num_users", "%d", "\tnum_users: %d\n", true },
- { "microvolts", "%d", "\tmicrovolts: %d\n", true },
- { "max_microvolts", "%d", "\tmax_microvolts: %d\n", true },
- { "min_microvolts", "%d", "\tmin_microvolts: %d\n", true },
+ { "num_users", "%s", "\tnum_users: %d\n", true },
+ { "microvolts", "%s", "\tmicrovolts: %d\n", true },
+ { "max_microvolts", "%s", "\tmax_microvolts: %d\n", true },
+ { "min_microvolts", "%s", "\tmin_microvolts: %d\n", true },
};
static struct tree *reg_tree;