From: Hartmut Knaack Date: Thu, 7 Aug 2014 11:06:00 +0000 (+0100) Subject: staging:iio:ad7291 faciliate ad7291_read_event_config() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8a32f65f389396267ae50a78d3416bcac5d4d959;p=linux-beck.git staging:iio:ad7291 faciliate ad7291_read_event_config() Save some lines in returning a voltage event. Signed-off-by: Hartmut Knaack Acked-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron --- diff --git a/drivers/staging/iio/adc/ad7291.c b/drivers/staging/iio/adc/ad7291.c index 0ec6454b33a1..40f1cea25e1f 100644 --- a/drivers/staging/iio/adc/ad7291.c +++ b/drivers/staging/iio/adc/ad7291.c @@ -247,10 +247,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;