提交 8b1f5227 编写于 作者: J Jonathan Cameron 提交者: Greg Kroah-Hartman

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: NJonathan Cameron <jic23@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 0b27d678
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册