From: Jonathan Cameron <jic23@kernel.org>
To: Lars-Peter Clausen <lars@metafoo.de>,
Hartmut Knaack <knaack.h@gmx.de>,
Peter Meerwald <pmeerw@pmeerw.net>
Cc: Octavian Purdila <octavian.purdila@intel.com>, linux-iio@vger.kernel.org
Subject: Re: [PATCH v3 2/6] iio:iio_buffer_init(): Only set watermark if not already set
Date: Sun, 25 Oct 2015 13:50:54 +0000 [thread overview]
Message-ID: <562CDE3E.8060100@kernel.org> (raw)
In-Reply-To: <1444752629-3532-3-git-send-email-lars@metafoo.de>
On 13/10/15 17:10, Lars-Peter Clausen wrote:
> 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>
Applied.
> ---
> drivers/iio/industrialio-buffer.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
> index 7340922..5f2c8c8 100644
> --- a/drivers/iio/industrialio-buffer.c
> +++ b/drivers/iio/industrialio-buffer.c
> @@ -193,7 +193,8 @@ void iio_buffer_init(struct iio_buffer *buffer)
> INIT_LIST_HEAD(&buffer->buffer_list);
> init_waitqueue_head(&buffer->pollq);
> kref_init(&buffer->ref);
> - buffer->watermark = 1;
> + if (!buffer->watermark)
> + buffer->watermark = 1;
> }
> EXPORT_SYMBOL(iio_buffer_init);
>
>
next prev parent reply other threads:[~2015-10-25 13:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-13 16:10 [PATCH v3 0/6] iio: Add DMA buffer support Lars-Peter Clausen
2015-10-13 16:10 ` [PATCH v3 1/6] iio: Set device watermark based on watermark of all attached buffers Lars-Peter Clausen
2015-10-25 13:42 ` Jonathan Cameron
2015-10-13 16:10 ` [PATCH v3 2/6] iio:iio_buffer_init(): Only set watermark if not already set Lars-Peter Clausen
2015-10-25 13:50 ` Jonathan Cameron [this message]
2015-10-13 16:10 ` [PATCH v3 3/6] iio: Add support for indicating fixed watermarks Lars-Peter Clausen
2015-10-25 13:51 ` Jonathan Cameron
2015-10-13 16:10 ` [PATCH v3 4/6] iio: Add buffer enable/disable callbacks Lars-Peter Clausen
2015-10-25 13:52 ` Jonathan Cameron
2015-10-13 16:10 ` [PATCH v3 5/6] iio: Add generic DMA buffer infrastructure Lars-Peter Clausen
2015-10-25 13:55 ` Jonathan Cameron
2015-10-13 16:10 ` [PATCH v3 6/6] iio: Add a DMAengine framework based buffer Lars-Peter Clausen
2015-10-25 13:56 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=562CDE3E.8060100@kernel.org \
--to=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=octavian.purdila@intel.com \
--cc=pmeerw@pmeerw.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.