From: Jonathan Cameron <jic23@kernel.org>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Jonathan Cameron <jic23@cam.ac.uk>,
Michael Hennerich <michael.hennerich@analog.com>,
linux-iio@vger.kernel.org,
device-drivers-devel@blackfin.uclinux.org, drivers@analog.com
Subject: Re: [PATCH 1/8] staging:iio: Use iio_buffer_enabled instead of open coding it
Date: Fri, 16 Dec 2011 19:43:39 +0000 [thread overview]
Message-ID: <4EEB9F6B.3040104@kernel.org> (raw)
In-Reply-To: <1324030791-17983-1-git-send-email-lars@metafoo.de>
All this set look fine to me but please sit on them until Monday so they
can get a little more exposure. Acked-by: Jonathan Cameron
<jic23@kernel.org> for all 8.
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
> drivers/staging/iio/industrialio-buffer.c | 5 ++---
> 1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/iio/industrialio-buffer.c b/drivers/staging/iio/industrialio-buffer.c
> index a03a574..5fe7f83 100644
> --- a/drivers/staging/iio/industrialio-buffer.c
> +++ b/drivers/staging/iio/industrialio-buffer.c
> @@ -420,7 +420,7 @@ ssize_t iio_buffer_store_enable(struct device *dev,
> mutex_lock(&indio_dev->mlock);
> previous_mode = indio_dev->currentmode;
> requested_state = !(buf[0] == '0');
> - current_state = !!(previous_mode & INDIO_ALL_BUFFER_MODES);
> + current_state = iio_buffer_enabled(indio_dev);
> if (current_state == requested_state) {
> printk(KERN_INFO "iio-buffer, current state requested again\n");
> goto done;
> @@ -509,8 +509,7 @@ ssize_t iio_buffer_show_enable(struct device *dev,
> char *buf)
> {
> struct iio_dev *indio_dev = dev_get_drvdata(dev);
> - return sprintf(buf, "%d\n", !!(indio_dev->currentmode
> - & INDIO_ALL_BUFFER_MODES));
> + return sprintf(buf, "%d\n", iio_buffer_enabled(indio_dev));
> }
> EXPORT_SYMBOL(iio_buffer_show_enable);
>
next prev parent reply other threads:[~2011-12-16 19:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-16 10:19 [PATCH 1/8] staging:iio: Use iio_buffer_enabled instead of open coding it Lars-Peter Clausen
2011-12-16 10:19 ` [PATCH 2/8] staging:iio: Disallow changing scan elements in all buffered modes Lars-Peter Clausen
2011-12-16 10:19 ` [PATCH 3/8] staging:iio: Disallow modifying buffer size when buffer is enabled Lars-Peter Clausen
2011-12-16 10:19 ` [PATCH 4/8] staging:iio: Make sure a device is only opened once at a time Lars-Peter Clausen
2011-12-16 10:19 ` [PATCH 5/8] staging:iio: Drop buffer busy flag Lars-Peter Clausen
2011-12-16 10:19 ` [PATCH 6/8] staging:iio: Drop buffer mark_param_change callback Lars-Peter Clausen
2011-12-16 10:19 ` [PATCH 7/8] staging:iio: Drop the unused buffer enable() and is_enabled() callbacks Lars-Peter Clausen
2011-12-16 10:19 ` [PATCH 8/8] iio:staging: Drop {mark,unmark}_in_use callbacks Lars-Peter Clausen
2011-12-16 19:43 ` Jonathan Cameron [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-12-19 14:23 [PATCH 1/8] staging:iio: Use iio_buffer_enabled instead of open coding it Lars-Peter Clausen
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=4EEB9F6B.3040104@kernel.org \
--to=jic23@kernel.org \
--cc=device-drivers-devel@blackfin.uclinux.org \
--cc=drivers@analog.com \
--cc=jic23@cam.ac.uk \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=michael.hennerich@analog.com \
/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 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).