On 08/07/14 12:06, Hartmut Knaack wrote:
Save some lines in returning a voltage event. Signed-off-by: Hartmut Knaack <knaack.h@xxxxxx>
Applied to the togreg branch of iio.git Thanks
--- diff --git a/drivers/staging/iio/adc/ad7291.c b/drivers/staging/iio/adc/ad7291.c index 654b39e..06eb0c0 100644 --- a/drivers/staging/iio/adc/ad7291.c +++ b/drivers/staging/iio/adc/ad7291.c @@ -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 majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
-- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html