Skip to contentSkip to conversation

patch "iio:light:cm3323: clear bitmask before set" added to staging-linus

PATCH [email protected] 1 participant 1 message Jul 23, 2015

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

iio:light:cm3323: clear bitmask before set

to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

Quoted 1 line

From bd7bd0cc3a60e082b17a4f64ce76831aa1c6dffe Mon Sep 17 00:00:00 2001

From: Hartmut Knaack <[email protected]>
Date: Thu, 18 Jun 2015 00:31:59 +0200
Subject: iio:light:cm3323: clear bitmask before set

When setting the bits for integration time, the appropriate bitmask needs to be cleared first.

---
 drivers/iio/light/cm3323.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/light/cm3323.c +1 -1
index 869033e48a1f..a1d4905cc9d2 100644
@@ -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,
Signature · 1 line
2.4.6