summaryrefslogtreecommitdiffstats
path: root/drivers/iio/light
diff options
context:
space:
mode:
authorJonathan Cameron2018-08-01 19:56:17 +0200
committerJonathan Cameron2018-08-01 19:56:17 +0200
commit2b4ec22d36d46d03d01d1ec2436080d982284f36 (patch)
treee143c4f38e4ddc275bd29373bdd9869f659a24fd /drivers/iio/light
parentiio: adc: xilinx: Move request_irq before enabling interrupts (diff)
parentiio: light: si1133 fix test for val being not zero or not one. (diff)
downloadkernel-qcow2-linux-2b4ec22d36d46d03d01d1ec2436080d982284f36.tar.gz
kernel-qcow2-linux-2b4ec22d36d46d03d01d1ec2436080d982284f36.tar.xz
kernel-qcow2-linux-2b4ec22d36d46d03d01d1ec2436080d982284f36.zip
Merge branch 'fixes-togreg' into togreg
Diffstat (limited to 'drivers/iio/light')
-rw-r--r--drivers/iio/light/si1133.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/light/si1133.c b/drivers/iio/light/si1133.c
index d3fbeb3bc463..5ac22c46da1f 100644
--- a/drivers/iio/light/si1133.c
+++ b/drivers/iio/light/si1133.c
@@ -838,7 +838,7 @@ static int si1133_write_raw(struct iio_dev *iio_dev,
switch (chan->type) {
case IIO_INTENSITY:
case IIO_UVINDEX:
- if (val != 0 || val != 1)
+ if (val != 0 && val != 1)
return -EINVAL;
return si1133_update_adcsens(data,