Commit ff39a252 authored by Melike Yurtoglu's avatar Melike Yurtoglu Committed by Greg Kroah-Hartman

staging: iio: Fix missing blank line warning

Fixes "Missing a blank line after declarations" checkpatch.pl warning in
Documentation/generic_buffer.c
Signed-off-by: default avatarMelike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a724d08d
...@@ -47,6 +47,7 @@ int size_from_channelarray(struct iio_channel_info *channels, int num_channels) ...@@ -47,6 +47,7 @@ int size_from_channelarray(struct iio_channel_info *channels, int num_channels)
{ {
int bytes = 0; int bytes = 0;
int i = 0; int i = 0;
while (i < num_channels) { while (i < num_channels) {
if (bytes % channels[i].bytes == 0) if (bytes % channels[i].bytes == 0)
channels[i].location = bytes; channels[i].location = bytes;
...@@ -74,12 +75,14 @@ void print2byte(int input, struct iio_channel_info *info) ...@@ -74,12 +75,14 @@ void print2byte(int input, struct iio_channel_info *info)
input = input >> info->shift; input = input >> info->shift;
if (info->is_signed) { if (info->is_signed) {
int16_t val = input; int16_t val = input;
val &= (1 << info->bits_used) - 1; val &= (1 << info->bits_used) - 1;
val = (int16_t)(val << (16 - info->bits_used)) >> val = (int16_t)(val << (16 - info->bits_used)) >>
(16 - info->bits_used); (16 - info->bits_used);
printf("%05f ", ((float)val + info->offset)*info->scale); printf("%05f ", ((float)val + info->offset)*info->scale);
} else { } else {
uint16_t val = input; uint16_t val = input;
val &= (1 << info->bits_used) - 1; val &= (1 << info->bits_used) - 1;
printf("%05f ", ((float)val + info->offset)*info->scale); printf("%05f ", ((float)val + info->offset)*info->scale);
} }
...@@ -97,6 +100,7 @@ void process_scan(char *data, ...@@ -97,6 +100,7 @@ void process_scan(char *data,
int num_channels) int num_channels)
{ {
int k; int k;
for (k = 0; k < num_channels; k++) for (k = 0; k < num_channels; k++)
switch (channels[k].bytes) { switch (channels[k].bytes) {
/* only a few cases implemented so far */ /* only a few cases implemented so far */
......
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