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:59 +0100 |
commit | 3b271798330ede49dc41615ce4eceb7a3aef8cd9 (patch) | |
tree | c6aa48029a9dd67b5a62ff11a40e2ddacb0e2e8e /drivers/iio/light/gp2ap020a00f.c | |
parent | 0624bf847dd0ddc9bf71ccb9d1a6fffa9e5a8dd0 (diff) | |
download | op-kernel-dev-3b271798330ede49dc41615ce4eceb7a3aef8cd9.zip op-kernel-dev-3b271798330ede49dc41615ce4eceb7a3aef8cd9.tar.gz |
iio:gp2ap020a00f: 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: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/light/gp2ap020a00f.c')
-rw-r--r-- | drivers/iio/light/gp2ap020a00f.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/iio/light/gp2ap020a00f.c b/drivers/iio/light/gp2ap020a00f.c index 62809b5..b1e4615 100644 --- a/drivers/iio/light/gp2ap020a00f.c +++ b/drivers/iio/light/gp2ap020a00f.c @@ -988,13 +988,8 @@ static irqreturn_t gp2ap020a00f_trigger_handler(int irq, void *data) } } - if (indio_dev->scan_timestamp) { - s64 *timestamp = (s64 *)((u8 *)priv->buffer + - ALIGN(d_size, sizeof(s64))); - *timestamp = pf->timestamp; - } - - iio_push_to_buffers(indio_dev, priv->buffer); + iio_push_to_buffers_with_timestamp(indio_dev, priv->buffer, + pf->timestamp); done: iio_trigger_notify_done(indio_dev->trig); |