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

Skip to content
Commit c559afbf authored by Jonathan Cameron's avatar Jonathan Cameron
Browse files

iio:kfifo_buf Take advantage of the fixed record size used in IIO



By bypassing the standard macros for setting up the kfifo we can
take advantage of the fixed record size implementation without
having to have a type to pass in (from which the size of an element
is normally established).

In IIO we have variable 'scans' as our records in which any element
can be present or not.  They do not however vary when we are
actually filling or reading from the buffer.  Thus we have a fixed
record size whenever we are actually running.  As setup and tear
down are not in the fast path we can take the overhead of reinitializing
the kfifo every time.

Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
Tested-by: default avatarLars-Peter Clausen <lars@metafoo.de>
parent 8e828752
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment