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:56 +0100 |
commit | aa4e24279a6b3caa40def6fe81a01772f8cade7e (patch) | |
tree | 3cbbfd9971fecfb44f60c570e008d60f952a67ff /drivers/iio | |
parent | d49d95c25db3dc7320839a817310dc4a2d60fbba (diff) | |
download | linux-aa4e24279a6b3caa40def6fe81a01772f8cade7e.tar.bz2 |
iio:st_sensors: 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>
Cc: Denis Ciocca <denis.ciocca@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/common/st_sensors/st_sensors_buffer.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/iio/common/st_sensors/st_sensors_buffer.c b/drivers/iio/common/st_sensors/st_sensors_buffer.c index 71a2c5f63b9c..1665c8e4b62b 100644 --- a/drivers/iio/common/st_sensors/st_sensors_buffer.c +++ b/drivers/iio/common/st_sensors/st_sensors_buffer.c @@ -113,11 +113,8 @@ irqreturn_t st_sensors_trigger_handler(int irq, void *p) if (len < 0) goto st_sensors_get_buffer_element_error; - if (indio_dev->scan_timestamp) - *(s64 *)((u8 *)sdata->buffer_data + - ALIGN(len, sizeof(s64))) = pf->timestamp; - - iio_push_to_buffers(indio_dev, sdata->buffer_data); + iio_push_to_buffers_with_timestamp(indio_dev, sdata->buffer_data, + pf->timestamp); st_sensors_get_buffer_element_error: iio_trigger_notify_done(indio_dev->trig); |