staging:iio:accel:sca3000 Fix clearing of flag + setting of size of scan.
authorJonathan Cameron <jic23@kernel.org>
Sat, 8 Oct 2016 16:39:04 +0000 (17:39 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sun, 23 Oct 2016 18:33:58 +0000 (19:33 +0100)
commit271a25f6480d51225abc2616df6c96e5979a7ffa
treee93d2f2132b13649d202b89a152572879b69ff29
parentd1bf1a865fe6b391208efab532b1e6fc912e5bed
staging:iio:accel:sca3000 Fix clearing of flag + setting of size of scan.

Not clearing the stuff_to_read flag can lead to a false flag being set
on restarting the buffer if the data was not all read the previous time.

The size of the scan is needed to ensure the function
iio_buffer_read_first_n_outer actually tries to read the data.

This stuff has been broken for some time so not stable material.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
drivers/staging/iio/accel/sca3000.c