]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
staging:iio:adc:ad7291: fix mask bit generation
authorMichael Hennerich <michael.hennerich@analog.com>
Fri, 2 Sep 2011 16:25:41 +0000 (17:25 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 6 Sep 2011 23:03:36 +0000 (16:03 -0700)
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/iio/adc/ad7291.c

index 9d1af0e9cc0febf474372b9b857936dc5c03becc..d125af0ccf590d59c1a3046d3298dd7ad1bf1adc 100644 (file)
@@ -418,7 +418,7 @@ static int ad7291_write_event_config(struct iio_dev *indio_dev,
                                ~(1 << IIO_EVENT_CODE_EXTRACT_NUM(event_code));
                else if (state && (!(chip->c_mask &
                                (1 << IIO_EVENT_CODE_EXTRACT_NUM(event_code)))))
-                       chip->c_mask &=
+                       chip->c_mask |=
                                (1 << IIO_EVENT_CODE_EXTRACT_NUM(event_code));
                else
                        break;