From: Jonathan Cameron <jic23@kernel.org>
To: Hartmut Knaack <knaack.h@gmx.de>, linux-iio@vger.kernel.org
Cc: Lars-Peter Clausen <lars@metafoo.de>
Subject: Re: [PATCH 5/6] staging:iio:ad7291 faciliate ad7291_read_event_config()
Date: Tue, 08 Jul 2014 21:14:34 +0100 [thread overview]
Message-ID: <53BC512A.7010002@kernel.org> (raw)
In-Reply-To: <53BBD0D1.2070507@gmx.de>
On 08/07/14 12:06, Hartmut Knaack wrote:
> Save some lines in returning a voltage event.
>
> Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Applied to the togreg branch of iio.git
Thanks
> ---
> diff --git a/drivers/staging/iio/adc/ad7291.c b/drivers/staging/iio/adc/ad7291.c
> index 654b39e..06eb0c0 100644
> --- a/drivers/staging/iio/adc/ad7291.c
> +++ b/drivers/staging/iio/adc/ad7291.c
> @@ -242,10 +242,7 @@ static int ad7291_read_event_config(struct iio_dev *indio_dev,
>
> switch (chan->type) {
> case IIO_VOLTAGE:
> - if (chip->c_mask & BIT(15 - chan->channel))
> - return 1;
> - else
> - return 0;
> + return !!(chip->c_mask & BIT(15 - chan->channel));
> case IIO_TEMP:
> /* always on */
> return 1;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2014-07-08 20:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-08 11:06 [PATCH 5/6] staging:iio:ad7291 faciliate ad7291_read_event_config() Hartmut Knaack
2014-07-08 20:14 ` Jonathan Cameron [this message]
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=53BC512A.7010002@kernel.org \
--to=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
/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.