staging:iio:ad7291 faciliate ad7291_read_event_config()
Subsystems (4)
PATCH 5/6 staging:iio:ad7291 faciliate ad7291_read_event_config()
Save some lines in returning a voltage event.
Signed-off-by Hartmut Knaack <[email protected]>
---
drivers/staging/iio/adc/ad7291.c +1 -4
@@ -242,10 +242,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 ;
Quoted 3 lines · Hartmut Knaack
Save some lines in returning a voltage event.
Signed-off-by Hartmut Knaack <[email protected]>
Applied to the togreg branch of iio.git
Thanks
Quoted 22 lines
---
drivers/staging/iio/adc/ad7291.c +1
-5@@ -242,10 +242,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 ; --To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html