iio:iio_buffer_init(): Only set watermark if not already set
authorLars-Peter Clausen <lars@metafoo.de>
Tue, 13 Oct 2015 16:10:25 +0000 (18:10 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 25 Oct 2015 13:50:42 +0000 (13:50 +0000)
commit4a60535726d90bfad16b5c52dcffaeede9fb84a9
treea81823dc3641cf152b3235b1d7e54f59531a33b9
parentf0566c0c405de543efb6fb8b8988cc7743d85ea6
iio:iio_buffer_init(): Only set watermark if not already set

Only initialize the watermark field if it is still 0. This allows drivers
to provide a custom default watermark value. E.g. some driver might have a
fixed watermark or can only support watermarks within a certain range and
the initial value for the watermark should be within this range.

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