forked from Minki/linux
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>
This commit is contained in:
parent
0624bf847d
commit
3b27179833
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user