diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-03-08 00:31:42 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-17 20:55:56 (GMT) |
commit | d288151847208b2249dac8fdcdd1b71c75590428 (patch) | |
tree | 7a97e67c4377ed6c02b5f6b93b04a9f4cf44bf46 /drivers | |
parent | 199c3536dd38e7e3491534d418fb41e55dd613a4 (diff) | |
download | linux-d288151847208b2249dac8fdcdd1b71c75590428.tar.xz |
staging: comedi: dt3000: use cfc_handle_events()
Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().
Update the Kconfig so that COMEDI_DT3000 selects COMEDI_FC.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/comedi/Kconfig | 1 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/dt3000.c | 6 |
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig index 2fb0cc0..279364a 100644 --- a/drivers/staging/comedi/Kconfig +++ b/drivers/staging/comedi/Kconfig @@ -860,6 +860,7 @@ config COMEDI_DAS08_PCI config COMEDI_DT3000 tristate "Data Translation DT3000 series support" + select COMEDI_FC ---help--- Enable support for Data Translation DT3000 series DT3001, DT3001-PGL, DT3002, DT3003, DT3003-PGL, DT3004, DT3005 and diff --git a/drivers/staging/comedi/drivers/dt3000.c b/drivers/staging/comedi/drivers/dt3000.c index f54685e..436e451 100644 --- a/drivers/staging/comedi/drivers/dt3000.c +++ b/drivers/staging/comedi/drivers/dt3000.c @@ -369,12 +369,10 @@ static irqreturn_t dt3k_interrupt(int irq, void *d) s->async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA; debug_n_ints++; - if (debug_n_ints >= 10) { - dt3k_ai_cancel(dev, s); + if (debug_n_ints >= 10) s->async->events |= COMEDI_CB_EOA; - } - comedi_event(dev, s); + cfc_handle_events(dev, s); return IRQ_HANDLED; } |