diff options
author | Thara Gopinath <thara.gopinath@linaro.org> | 2017-07-14 13:15:47 -0400 |
---|---|---|
committer | Lisa Nguyen <lisa.nguyen@linaro.org> | 2017-09-19 12:58:06 -0700 |
commit | ce1acda61617d3ab02087f97a6b073b460399e32 (patch) | |
tree | 65868d31bcad99edff6eeb3a38ec76fcbddf66b4 | |
parent | 569054ea21aee41d84e9b864c0c381ab9b988541 (diff) | |
download | powerdebug-ce1acda61617d3ab02087f97a6b073b460399e32.tar.gz |
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>
-rw-r--r-- | regulator.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/regulator.c b/regulator.c index b452f2b..ae0107f 100644 --- a/regulator.c +++ b/regulator.c @@ -66,10 +66,10 @@ static struct regulator_data regdata[] = { { "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; |