diff options
author | Jonathan Cameron <jic23@kernel.org> | 2012-04-10 21:11:09 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-10 13:26:33 -0700 |
commit | 487db48506513fa80138951f081db3d12b36b7e1 (patch) | |
tree | cf87cdbcef5b898265664898a57b4eff7ec91cc0 /drivers/staging/iio/imu | |
parent | 8b1f52278f544af608d576e8db2b79ed651a9414 (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/imu')
-rw-r--r-- | drivers/staging/iio/imu/adis16400_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/iio/imu/adis16400_core.c b/drivers/staging/iio/imu/adis16400_core.c index e73ad7818d8..a027d6d7141 100644 --- a/drivers/staging/iio/imu/adis16400_core.c +++ b/drivers/staging/iio/imu/adis16400_core.c @@ -1172,7 +1172,7 @@ static int __devinit adis16400_probe(struct spi_device *spi) return 0; error_remove_trigger: - if (indio_dev->modes & INDIO_BUFFER_TRIGGERED) + if (spi->irq) adis16400_remove_trigger(indio_dev); error_uninitialize_ring: iio_buffer_unregister(indio_dev); |