stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "iio: fix config watermark initial value" has been added to the 4.5-stable tree
@ 2016-04-17 10:26 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-04-17 10:26 UTC (permalink / raw)
  To: irina.tirdea, gregkh, jic23; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    iio: fix config watermark initial value

to the 4.5-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     iio-fix-config-watermark-initial-value.patch
and it can be found in the queue-4.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 1bef2c1d4e4fd92bdf8219b13ba97ba861618254 Mon Sep 17 00:00:00 2001
From: Irina Tirdea <irina.tirdea@intel.com>
Date: Thu, 24 Mar 2016 11:09:45 +0200
Subject: iio: fix config watermark initial value

From: Irina Tirdea <irina.tirdea@intel.com>

commit 1bef2c1d4e4fd92bdf8219b13ba97ba861618254 upstream.

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")
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/iio/industrialio-buffer.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/iio/industrialio-buffer.c
+++ b/drivers/iio/industrialio-buffer.c
@@ -645,6 +645,7 @@ static int iio_verify_update(struct iio_
 	unsigned int modes;
 
 	memset(config, 0, sizeof(*config));
+	config->watermark = ~0;
 
 	/*
 	 * If there is just one buffer and we are removing it there is nothing


Patches currently in stable-queue which might be from irina.tirdea@intel.com are

queue-4.5/iio-gyro-bmg160-fix-buffer-read-values.patch
queue-4.5/iio-gyro-bmg160-fix-endianness-when-reading-axes.patch
queue-4.5/iio-fix-config-watermark-initial-value.patch
queue-4.5/iio-accel-bmc150-fix-endianness-when-reading-axes.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-04-17 11:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-17 10:26 Patch "iio: fix config watermark initial value" has been added to the 4.5-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).