Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1238794
| From | Jonathan Cameron <jic23@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] iio: fix drivers that use 0 as a valid IRQ in client->irq (part 2) |
| Date | 2015-10-03 12:10 +0200 |
| Message-ID | <qfrVn-77v-17@gated-at.bofh.it> (permalink) |
| References | <qbOdP-84X-13@gated-at.bofh.it> <qbOdQ-84X-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 23/09/15 10:02, Octavian Purdila wrote:
> 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>
Applied to the togreg branch of iio.git. Initially pushed out as
testing for the autobuilders to play with it.
Thanks,
Jonathan
> ---
> drivers/iio/accel/stk8312.c | 2 +-
> drivers/iio/accel/stk8ba50.c | 2 +-
> 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 c764af2..a578694 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 80f77d8..a59f5d8 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 25c6a71..4e56c90 100644
> --- a/drivers/iio/light/stk3310.c
> +++ b/drivers/iio/light/stk3310.c
> @@ -636,7 +636,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,
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/2] remove unused ACPI GPIO interrupt probing code Octavian Purdila <octavian.purdila@intel.com> - 2015-09-23 11:10 +0200
[PATCH 2/2] iio: remove gpio interrupt probing from drivers that use a single interrupt Octavian Purdila <octavian.purdila@intel.com> - 2015-09-23 11:10 +0200
Re: [PATCH 2/2] iio: remove gpio interrupt probing from drivers that use a single interrupt Bastien Nocera <hadess@hadess.net> - 2015-09-23 11:10 +0200
Re: [PATCH 2/2] iio: remove gpio interrupt probing from drivers that use a single interrupt Jonathan Cameron <jic23@kernel.org> - 2015-10-03 12:10 +0200
[PATCH 1/2] iio: fix drivers that use 0 as a valid IRQ in client->irq (part 2) Octavian Purdila <octavian.purdila@intel.com> - 2015-09-23 11:10 +0200
Re: [PATCH 1/2] iio: fix drivers that use 0 as a valid IRQ in client->irq (part 2) Jonathan Cameron <jic23@kernel.org> - 2015-10-03 12:10 +0200
csiph-web