Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4fa10de6 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Jonathan Cameron
Browse files

staging:iio:mxs-lradc: 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>
Reviewed-by: default avatarMarek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent c6f06818
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -625,13 +625,7 @@ static irqreturn_t mxs_lradc_trigger_handler(int irq, void *p)
		j++;
	}

	if (iio->scan_timestamp) {
		s64 *timestamp = (s64 *)((u8 *)lradc->buffer +
					ALIGN(j, sizeof(s64)));
		*timestamp = pf->timestamp;
	}

	iio_push_to_buffers(iio, lradc->buffer);
	iio_push_to_buffers_with_timestamp(iio, lradc->buffer, pf->timestamp);

	iio_trigger_notify_done(iio->trig);