Searched hist:"1 bef2c1d4e4fd92bdf8219b13ba97ba861618254" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/iio/ |
H A D | industrialio-buffer.c | diff 1bef2c1d4e4fd92bdf8219b13ba97ba861618254 Thu Mar 24 04:09:45 CDT 2016 Irina Tirdea <irina.tirdea@intel.com> iio: fix config watermark initial value
config structure is set to 0 when updating the buffers, so by default config->watermark will be 0. When computing the minimum between config->watermark and the buffer->watermark or insert_buffer-watermark, this will always be 0 regardless of the value set by the user for the buffer.
Set as initial value for config->watermark the maximum allowed value so that the minimum value will always be set from one of the buffers.
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Fixes: f0566c0c405d ("iio: Set device watermark based on watermark of all attached buffers") Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|