提交 1d633fd1 编写于 作者: P Peter Meerwald 提交者: Greg Kroah-Hartman

staging: iio: fix generic_buffer print2byte()

drop extra argument, move cast
Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net>
Acked-by: NJonathan Cameron <jic23@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 fa6173a0
......@@ -72,8 +72,7 @@ void print2byte(int input, struct iio_channel_info *info)
val &= (1 << info->bits_used) - 1;
val = (int16_t)(val << (16 - info->bits_used)) >>
(16 - info->bits_used);
printf("%05f ", val,
(float)(val + info->offset)*info->scale);
printf("%05f ", ((float)val + info->offset)*info->scale);
} else {
uint16_t val = input;
val &= (1 << info->bits_used) - 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册