diff options
author | Jonathan Cameron <jic23@kernel.org> | 2012-04-10 20:11:08 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-10 20:26:33 (GMT) |
commit | 8b1f52278f544af608d576e8db2b79ed651a9414 (patch) | |
tree | fb4138fdb1c98733d1b134ece62b79c9d8467a4b /drivers | |
parent | 0b27d678c7fbeb88ab07b890b09c32a83121d9d6 (diff) | |
download | linux-fsl-qoriq-8b1f52278f544af608d576e8db2b79ed651a9414.tar.xz |
staging:iio:accel:lis3l02dq add symmetry to check for presence of trigger.
Checking indio_dev->modes is uggly and not symmetric with the conditions
on whether triggers are allowed in the first place.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/iio/accel/lis3l02dq_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/iio/accel/lis3l02dq_core.c b/drivers/staging/iio/accel/lis3l02dq_core.c index 376da51..bcf4712 100644 --- a/drivers/staging/iio/accel/lis3l02dq_core.c +++ b/drivers/staging/iio/accel/lis3l02dq_core.c @@ -724,7 +724,7 @@ static int __devinit lis3l02dq_probe(struct spi_device *spi) return 0; error_remove_trigger: - if (indio_dev->modes & INDIO_BUFFER_TRIGGERED) + if (spi->irq && gpio_is_valid(irq_to_gpio(spi->irq))) lis3l02dq_remove_trigger(indio_dev); error_free_interrupt: if (spi->irq && gpio_is_valid(irq_to_gpio(spi->irq)) > 0) |