summaryrefslogtreecommitdiff
path: root/drivers/staging/iio/meter
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@kernel.org>2012-04-10 21:11:09 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-10 13:26:33 -0700
commit487db48506513fa80138951f081db3d12b36b7e1 (patch)
treecf87cdbcef5b898265664898a57b4eff7ec91cc0 /drivers/staging/iio/meter
parent8b1f52278f544af608d576e8db2b79ed651a9414 (diff)
staging:iio: use spi->irq valid rather than querying available modes
Given these drivers only try to add the trigger if a valid irq is present it is clearer to check the same condition when deciding whether to remove it on a later trigger. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/iio/meter')
-rw-r--r--drivers/staging/iio/meter/ade7758_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/iio/meter/ade7758_core.c b/drivers/staging/iio/meter/ade7758_core.c
index dcb20294dfe8..9374d6b264b0 100644
--- a/drivers/staging/iio/meter/ade7758_core.c
+++ b/drivers/staging/iio/meter/ade7758_core.c
@@ -800,7 +800,7 @@ static int __devinit ade7758_probe(struct spi_device *spi)
return 0;
error_remove_trigger:
- if (indio_dev->modes & INDIO_BUFFER_TRIGGERED)
+ if (spi->irq)
ade7758_remove_trigger(indio_dev);
error_uninitialize_ring:
ade7758_uninitialize_ring(indio_dev);