diff options
author | Octavian Purdila <octavian.purdila@intel.com> | 2015-09-23 12:02:00 +0300 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-10-03 11:02:37 +0100 |
commit | 6839c1b0700a79375639528985a0ec0fbd58cf9a (patch) | |
tree | 20c57a55143274a9a8886d73cd7ae2c705f2e3be /drivers/iio | |
parent | 1de953e77b8c8b8cb6f734733cf20e95a1b0fbb8 (diff) | |
download | linux-6839c1b0700a79375639528985a0ec0fbd58cf9a.tar.gz linux-6839c1b0700a79375639528985a0ec0fbd58cf9a.tar.bz2 linux-6839c1b0700a79375639528985a0ec0fbd58cf9a.zip |
iio: fix drivers that use 0 as a valid IRQ in client->irq (part 2)
Since commit dab472eb931bc291 ("i2c / ACPI: Use 0 to indicate that
device does not have interrupt assigned") 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.
Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/accel/stk8312.c | 2 | ||||
-rw-r--r-- | drivers/iio/accel/stk8ba50.c | 2 | ||||
-rw-r--r-- | drivers/iio/light/stk3310.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iio/accel/stk8312.c b/drivers/iio/accel/stk8312.c index c764af284c94..a57869400b1a 100644 --- a/drivers/iio/accel/stk8312.c +++ b/drivers/iio/accel/stk8312.c @@ -572,7 +572,7 @@ static int stk8312_probe(struct i2c_client *client, if (client->irq < 0) client->irq = stk8312_gpio_probe(client); - if (client->irq >= 0) { + if (client->irq > 0) { ret = devm_request_threaded_irq(&client->dev, client->irq, stk8312_data_rdy_trig_poll, NULL, diff --git a/drivers/iio/accel/stk8ba50.c b/drivers/iio/accel/stk8ba50.c index 80f77d8704b5..a59f5d87ae3a 100644 --- a/drivers/iio/accel/stk8ba50.c +++ b/drivers/iio/accel/stk8ba50.c @@ -468,7 +468,7 @@ static int stk8ba50_probe(struct i2c_client *client, if (client->irq < 0) client->irq = stk8ba50_gpio_probe(client); - if (client->irq >= 0) { + if (client->irq > 0) { ret = devm_request_threaded_irq(&client->dev, client->irq, stk8ba50_data_rdy_trig_poll, NULL, diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c index 013b21779db9..f45b06bcf6ae 100644 --- a/drivers/iio/light/stk3310.c +++ b/drivers/iio/light/stk3310.c @@ -632,7 +632,7 @@ static int stk3310_probe(struct i2c_client *client, } } - if (client->irq >= 0) { + if (client->irq > 0) { ret = devm_request_threaded_irq(&client->dev, client->irq, stk3310_irq_handler, stk3310_irq_event_handler, |