You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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:
committed by
Jonathan Cameron
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;
|
||||
|
||||
Reference in New Issue
Block a user