Commit 95273f89 authored by Derek Basehore's avatar Derek Basehore Committed by Jonathan Cameron

tsl2563: fixed bug with disabling interrupts

In tsl_2563_write_interrupt_config and tsl2562_remove, interrupts are not
disabled where they should be. This seems to be from a mistake of using |=
instead of &= in 2 lines of code.
Signed-off-by: default avatarDerek Basehore <dbasehore@chromium.org>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent e3db9ef6
...@@ -652,7 +652,7 @@ static int tsl2563_write_interrupt_config(struct iio_dev *indio_dev, ...@@ -652,7 +652,7 @@ static int tsl2563_write_interrupt_config(struct iio_dev *indio_dev,
} }
if (!state && (chip->intr & 0x30)) { if (!state && (chip->intr & 0x30)) {
chip->intr |= ~0x30; chip->intr &= ~0x30;
ret = i2c_smbus_write_byte_data(chip->client, ret = i2c_smbus_write_byte_data(chip->client,
TSL2563_CMD | TSL2563_REG_INT, TSL2563_CMD | TSL2563_REG_INT,
chip->intr); chip->intr);
...@@ -814,7 +814,7 @@ static int __devexit tsl2563_remove(struct i2c_client *client) ...@@ -814,7 +814,7 @@ static int __devexit tsl2563_remove(struct i2c_client *client)
if (!chip->int_enabled) if (!chip->int_enabled)
cancel_delayed_work(&chip->poweroff_work); cancel_delayed_work(&chip->poweroff_work);
/* Ensure that interrupts are disabled - then flush any bottom halves */ /* Ensure that interrupts are disabled - then flush any bottom halves */
chip->intr |= ~0x30; chip->intr &= ~0x30;
i2c_smbus_write_byte_data(chip->client, TSL2563_CMD | TSL2563_REG_INT, i2c_smbus_write_byte_data(chip->client, TSL2563_CMD | TSL2563_REG_INT,
chip->intr); chip->intr);
flush_scheduled_work(); flush_scheduled_work();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment