projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f25330f
)
iio:magnetometer:mag3110: Fix output of decimal digits in show_int_plus_micros()
author
Peter Meerwald
<pmeerw@pmeerw.net>
Wed, 1 Oct 2014 20:59:00 +0000
(21:59 +0100)
committer
Jonathan Cameron
<jic23@kernel.org>
Sat, 8 Feb 2014 10:06:27 +0000
(10:06 +0000)
need to print leading zeros, hence "%d.%06d"
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/magnetometer/mag3110.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/iio/magnetometer/mag3110.c
b/drivers/iio/magnetometer/mag3110.c
index b88cb44f87ce6c205addbac271404b0340f70bc6..f66955fb3509e261f3a0d0cf7028f6178b3cb1a2 100644
(file)
--- a/
drivers/iio/magnetometer/mag3110.c
+++ b/
drivers/iio/magnetometer/mag3110.c
@@
-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.%
06
d ", vals[n][0], vals[n][1]);
/* replace trailing space by newline */
buf[len - 1] = '\n';