diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-09-19 16:59:00 +0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-09-21 22:23:54 +0400 |
commit | a1be505f49cacb288182c7281680ef5f93dea2f7 (patch) | |
tree | 02485d3d81c99c3ad24e8b594a91450ba25986b0 /drivers/iio/adc/ad_sigma_delta.c | |
parent | 9f4fa4f714241119ee9b0065648e58a2f7012cc9 (diff) | |
download | linux-a1be505f49cacb288182c7281680ef5f93dea2f7.tar.xz |
iio:ad_sigma_delta: 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/ad_sigma_delta.c')
-rw-r--r-- | drivers/iio/adc/ad_sigma_delta.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/iio/adc/ad_sigma_delta.c b/drivers/iio/adc/ad_sigma_delta.c index 78d276f40c8e..2b5911274763 100644 --- a/drivers/iio/adc/ad_sigma_delta.c +++ b/drivers/iio/adc/ad_sigma_delta.c @@ -368,10 +368,6 @@ static irqreturn_t ad_sd_trigger_handler(int irq, void *p) memset(data, 0x00, 16); - /* Guaranteed to be aligned with 8 byte boundary */ - if (indio_dev->scan_timestamp) - ((s64 *)data)[1] = pf->timestamp; - reg_size = indio_dev->channels[0].scan_type.realbits + indio_dev->channels[0].scan_type.shift; reg_size = DIV_ROUND_UP(reg_size, 8); @@ -391,7 +387,7 @@ static irqreturn_t ad_sd_trigger_handler(int irq, void *p) break; } - iio_push_to_buffers(indio_dev, data); + iio_push_to_buffers_with_timestamp(indio_dev, data, pf->timestamp); iio_trigger_notify_done(indio_dev->trig); sigma_delta->irq_dis = false; |