diff options
Diffstat (limited to 'kernel/drivers/iio/light')
-rw-r--r-- | kernel/drivers/iio/light/cm3323.c | 2 | ||||
-rw-r--r-- | kernel/drivers/iio/light/tcs3414.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/kernel/drivers/iio/light/cm3323.c b/kernel/drivers/iio/light/cm3323.c index 869033e48..a1d4905cc 100644 --- a/kernel/drivers/iio/light/cm3323.c +++ b/kernel/drivers/iio/light/cm3323.c @@ -123,7 +123,7 @@ static int cm3323_set_it_bits(struct cm3323_data *data, int val, int val2) for (i = 0; i < ARRAY_SIZE(cm3323_int_time); i++) { if (val == cm3323_int_time[i].val && val2 == cm3323_int_time[i].val2) { - reg_conf = data->reg_conf; + reg_conf = data->reg_conf & ~CM3323_CONF_IT_MASK; reg_conf |= i << CM3323_CONF_IT_SHIFT; ret = i2c_smbus_write_word_data(data->client, diff --git a/kernel/drivers/iio/light/tcs3414.c b/kernel/drivers/iio/light/tcs3414.c index 71c2bde27..f8b1df018 100644 --- a/kernel/drivers/iio/light/tcs3414.c +++ b/kernel/drivers/iio/light/tcs3414.c @@ -185,7 +185,7 @@ static int tcs3414_write_raw(struct iio_dev *indio_dev, if (val != 0) return -EINVAL; for (i = 0; i < ARRAY_SIZE(tcs3414_times); i++) { - if (val == tcs3414_times[i] * 1000) { + if (val2 == tcs3414_times[i] * 1000) { data->timing &= ~TCS3414_INTEG_MASK; data->timing |= i; return i2c_smbus_write_byte_data( |