Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 259590
b: refs/heads/master
c: 71646e2
h: refs/heads/master
v: v3
  • Loading branch information
Michael Hennerich authored and Greg Kroah-Hartman committed Jun 28, 2011
1 parent adca5f4 commit ce8e474
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6263ba551985ad7201d0e7f36672c7a0f57f61f4
refs/heads/master: 71646e2c7ae4edb92dfa89eccb354d81be1cbbbd
1 change: 1 addition & 0 deletions trunk/drivers/staging/iio/iio.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ static inline s64 iio_get_time_ns(void)
* call to iio_device_register. */
#define IIO_VAL_INT 1
#define IIO_VAL_INT_PLUS_MICRO 2
#define IIO_VAL_INT_PLUS_NANO 3

/**
* struct iio_info - constant information about device
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/staging/iio/industrialio-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,11 @@ static ssize_t iio_read_channel_info(struct device *dev,
return sprintf(buf, "-%d.%06u\n", val, -val2);
else
return sprintf(buf, "%d.%06u\n", val, val2);
} else if (ret == IIO_VAL_INT_PLUS_NANO) {
if (val2 < 0)
return sprintf(buf, "-%d.%09u\n", val, -val2);
else
return sprintf(buf, "%d.%09u\n", val, val2);
} else
return 0;
}
Expand Down

0 comments on commit ce8e474

Please sign in to comment.