Commit 3b271798 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Jonathan Cameron
Browse files

iio:gp2ap020a00f: Use iio_push_to_buffers_with_timestamp()



Makes the code a bit shorter and less ugly.

Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Cc: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 0624bf84
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -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);