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:
parent
5714d0c13a
commit
8a32f65f38
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue