aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/gyro/itg3200_buffer.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-09-19 08:59:00 -0400
committerJonathan Cameron <jic23@kernel.org>2013-09-21 14:23:56 -0400
commit36e0371e7764a9b954ffdde6a4834e357ba31d28 (patch)
tree6179dc70ca20fd6b37432a6b04cdce9968d000e8 /drivers/iio/gyro/itg3200_buffer.c
parentaa4e24279a6b3caa40def6fe81a01772f8cade7e (diff)
iio:itg3200: 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: Manuel Stahl <manuel.stahl@iis.fraunhofer.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/gyro/itg3200_buffer.c')
-rw-r--r--drivers/iio/gyro/itg3200_buffer.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/iio/gyro/itg3200_buffer.c b/drivers/iio/gyro/itg3200_buffer.c
index 6b3c30118c48..e3b3c5084070 100644
--- a/drivers/iio/gyro/itg3200_buffer.c
+++ b/drivers/iio/gyro/itg3200_buffer.c
@@ -55,11 +55,8 @@ static irqreturn_t itg3200_trigger_handler(int irq, void *p)
55 if (ret < 0) 55 if (ret < 0)
56 goto error_ret; 56 goto error_ret;
57 57
58 if (indio_dev->scan_timestamp) 58 iio_push_to_buffers_with_timestamp(indio_dev, buf, pf->timestamp);
59 memcpy(buf + indio_dev->scan_bytes - sizeof(s64),
60 &pf->timestamp, sizeof(pf->timestamp));
61 59
62 iio_push_to_buffers(indio_dev, buf);
63 iio_trigger_notify_done(indio_dev->trig); 60 iio_trigger_notify_done(indio_dev->trig);
64 61
65error_ret: 62error_ret: