staging: iio: fix generic_buffer print2byte()
authorPeter Meerwald <pmeerw@pmeerw.net>
Mon, 25 Jun 2012 21:12:11 +0000 (23:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Jun 2012 21:57:28 +0000 (14:57 -0700)
drop extra argument, move cast

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/iio/Documentation/generic_buffer.c

index bf553356fdada818bf537165753f77e57210e260..361e481faac2c7781b5775492f57d6308e0cfe82 100644 (file)
@@ -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;