staging:iio:ad7291 faciliate ad7291_read_event_config()

Save some lines in returning a voltage event.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
Hartmut Knaack 2014-08-07 12:06:00 +01:00 committed by Jonathan Cameron
parent 5714d0c13a
commit 8a32f65f38
1 changed files with 1 additions and 4 deletions

View File

@ -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;