diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-03-08 00:31:32 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-17 20:55:54 (GMT) |
commit | c9695093017d71a0571df7140feacfbf5ef4cdd4 (patch) | |
tree | a90382b914f097544f80275aebf3d38fd939797c /drivers | |
parent | f382898fabfa77dda6d77e8ad81fd7cc8edd0cee (diff) | |
download | linux-c9695093017d71a0571df7140feacfbf5ef4cdd4.tar.xz |
staging: comedi: das1800: use cfc_handle_events()
Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().
In the Kconfig, COMEDI_DAS1800 already 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/drivers/das1800.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/staging/comedi/drivers/das1800.c b/drivers/staging/comedi/drivers/das1800.c index 320d95a..9f353cf 100644 --- a/drivers/staging/comedi/drivers/das1800.c +++ b/drivers/staging/comedi/drivers/das1800.c @@ -665,9 +665,8 @@ static void das1800_ai_handler(struct comedi_device *dev) /* clear OVF interrupt bit */ outb(CLEAR_INTR_MASK & ~OVF, dev->iobase + DAS1800_STATUS); comedi_error(dev, "DAS1800 FIFO overflow"); - das1800_cancel(dev, s); async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA; - comedi_event(dev, s); + cfc_handle_events(dev, s); return; } /* stop taking data if appropriate */ @@ -680,16 +679,12 @@ static void das1800_ai_handler(struct comedi_device *dev) das1800_flush_dma(dev, s); else das1800_handle_fifo_not_empty(dev, s); - das1800_cancel(dev, s); /* disable hardware conversions */ async->events |= COMEDI_CB_EOA; } else if (cmd->stop_src == TRIG_COUNT && devpriv->count == 0) { /* stop_src TRIG_COUNT */ - das1800_cancel(dev, s); /* disable hardware conversions */ async->events |= COMEDI_CB_EOA; } - comedi_event(dev, s); - - return; + cfc_handle_events(dev, s); } static int das1800_ai_poll(struct comedi_device *dev, |