diff options
author | Octavian Purdila <octavian.purdila@intel.com> | 2015-06-05 16:59:42 +0300 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-07-23 22:23:11 +0300 |
commit | c176becd81843426eb8ab3b03aeeb19e387345fe (patch) | |
tree | d68666af7248a15085055896f95dfa5d776a057b /drivers/iio/accel/mma9553.c | |
parent | d9abc615ea1659b6967a00e95b1b3a7fd4079b80 (diff) | |
download | linux-c176becd81843426eb8ab3b03aeeb19e387345fe.tar.xz |
iio: fix drivers that consider 0 as a valid IRQ in client->irq
Since patch "i2c / ACPI: Use 0 to indicate that device does not have
interrupt assigned" [1], 0 is not a valid i2c client irq anymore, so
change all driver's checks accordingly.
The same issue occurs when the device is instantiated via device tree
with no IRQ, or from the i2c sysfs interface, even before the patch
above.
[1] http://lkml.kernel.org/g/<1430908148-201129-3-git-send-email-mika.westerberg@linux.intel.com>
Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/accel/mma9553.c')
-rw-r--r-- | drivers/iio/accel/mma9553.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/accel/mma9553.c b/drivers/iio/accel/mma9553.c index a605280637e9..771858cb67a1 100644 --- a/drivers/iio/accel/mma9553.c +++ b/drivers/iio/accel/mma9553.c @@ -1149,7 +1149,7 @@ static int mma9553_probe(struct i2c_client *client, if (client->irq < 0) client->irq = mma9553_gpio_probe(client); - if (client->irq >= 0) { + if (client->irq > 0) { ret = devm_request_threaded_irq(&client->dev, client->irq, mma9553_irq_handler, mma9553_event_handler, |