Commit 71bd8945 authored by Peter Meerwald's avatar Peter Meerwald Committed by Jonathan Cameron

iio:magnetometer:mag3110: Fix output of decimal digits in show_int_plus_micros()

need to print leading zeros, hence "%d.%06d"
Signed-off-by: default avatarPeter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent f25330f6
......@@ -106,7 +106,7 @@ static ssize_t mag3110_show_int_plus_micros(char *buf,
while (n-- > 0)
len += scnprintf(buf + len, PAGE_SIZE - len,
"%d.%d ", vals[n][0], vals[n][1]);
"%d.%06d ", vals[n][0], vals[n][1]);
/* replace trailing space by newline */
buf[len - 1] = '\n';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment