diff options
author | Derek Basehore <dbasehore@chromium.org> | 2012-10-05 00:54:00 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2012-11-17 10:17:24 +0000 |
commit | 95273f8952a7e3a037e139eec0aa99872f086498 (patch) | |
tree | cc3fc0c44c8a46f3ba8bf4a1c8585b4e194182a0 /drivers/staging/iio/light | |
parent | e3db9ef6eb39ac6d969787bc15756778c2c5ca66 (diff) |
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: Derek Basehore <dbasehore@chromium.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/staging/iio/light')
-rw-r--r-- | drivers/staging/iio/light/tsl2563.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/iio/light/tsl2563.c b/drivers/staging/iio/light/tsl2563.c index 954ca2c172c6..3f72543b188f 100644 --- a/drivers/staging/iio/light/tsl2563.c +++ b/drivers/staging/iio/light/tsl2563.c @@ -652,7 +652,7 @@ static int tsl2563_write_interrupt_config(struct iio_dev *indio_dev, } if (!state && (chip->intr & 0x30)) { - chip->intr |= ~0x30; + chip->intr &= ~0x30; ret = i2c_smbus_write_byte_data(chip->client, TSL2563_CMD | TSL2563_REG_INT, chip->intr); @@ -814,7 +814,7 @@ static int __devexit tsl2563_remove(struct i2c_client *client) if (!chip->int_enabled) cancel_delayed_work(&chip->poweroff_work); /* 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, chip->intr); flush_scheduled_work(); |