From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:50860 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751620AbcDQLCp (ORCPT ); Sun, 17 Apr 2016 07:02:45 -0400 Subject: Patch "iio: fix config watermark initial value" has been added to the 4.5-stable tree To: irina.tirdea@intel.com, gregkh@linuxfoundation.org, jic23@kernel.org Cc: , From: Date: Sun, 17 Apr 2016 03:26:42 -0700 Message-ID: <1460888802235222@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: 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 know about it. >>From 1bef2c1d4e4fd92bdf8219b13ba97ba861618254 Mon Sep 17 00:00:00 2001 From: Irina Tirdea Date: Thu, 24 Mar 2016 11:09:45 +0200 Subject: iio: fix config watermark initial value From: Irina Tirdea 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 Fixes: f0566c0c405d ("iio: Set device watermark based on watermark of all attached buffers") Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- 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