diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-09-19 13:59:00 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-09-21 19:23:55 +0100 |
commit | d49d95c25db3dc7320839a817310dc4a2d60fbba (patch) | |
tree | a5d23a59a3c5c0812b0b6e06f863d3c934eb47cc /drivers/iio/adc | |
parent | e79cece0dc82c54b0c7903381ee8cfcdc3b5bfe1 (diff) | |
download | blackbird-op-linux-d49d95c25db3dc7320839a817310dc4a2d60fbba.tar.gz blackbird-op-linux-d49d95c25db3dc7320839a817310dc4a2d60fbba.zip |
iio:max1363: Use iio_push_to_buffers_with_timestamp()
Makes the code a bit shorter and less ugly.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/adc')
-rw-r--r-- | drivers/iio/adc/max1363.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/iio/adc/max1363.c b/drivers/iio/adc/max1363.c index 1e7160de0b90..b4bc166d57b0 100644 --- a/drivers/iio/adc/max1363.c +++ b/drivers/iio/adc/max1363.c @@ -1436,7 +1436,6 @@ static irqreturn_t max1363_trigger_handler(int irq, void *p) struct iio_poll_func *pf = p; struct iio_dev *indio_dev = pf->indio_dev; struct max1363_state *st = iio_priv(indio_dev); - s64 time_ns; __u8 *rxbuf; int b_sent; size_t d_size; @@ -1470,11 +1469,7 @@ static irqreturn_t max1363_trigger_handler(int irq, void *p) if (b_sent < 0) goto done_free; - time_ns = iio_get_time_ns(); - - if (indio_dev->scan_timestamp) - memcpy(rxbuf + d_size - sizeof(s64), &time_ns, sizeof(time_ns)); - iio_push_to_buffers(indio_dev, rxbuf); + iio_push_to_buffers_with_timestamp(indio_dev, rxbuf, iio_get_time_ns()); done_free: kfree(rxbuf); |