Commit 8a32f65f authored by Hartmut Knaack's avatar Hartmut Knaack Committed by Jonathan Cameron

staging:iio:ad7291 faciliate ad7291_read_event_config()

Save some lines in returning a voltage event.
Signed-off-by: default avatarHartmut Knaack <knaack.h@gmx.de>
Acked-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 5714d0c1
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment