• Lars-Peter Clausen's avatar
    iio: Add data_available callback for buffers · 647cc7b9
    Lars-Peter Clausen authored
    This patch adds a new data_available() callback to the iio_buffer_access_funcs
    struct. The callback is used to indicate whether data is available in the buffer
    for reading. It is meant to replace the stufftoread flag from the iio_buffer
    struct. The reasoning for this is that the buffer implementation usually can
    determine whether data is available rather easily based on its state, on the
    other hand it can be rather tricky to update the stufftoread flag in a race free
    way.
    Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
    Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
    647cc7b9
industrialio-buffer.c 26.4 KB