From ce1acda61617d3ab02087f97a6b073b460399e32 Mon Sep 17 00:00:00 2001 From: Thara Gopinath Date: Fri, 14 Jul 2017 13:15:47 -0400 Subject: 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 --- regulator.c | 8 ++++---- 1 file 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; -- cgit v1.2.3