diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-03-08 00:31:31 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-17 20:55:54 (GMT) |
commit | f382898fabfa77dda6d77e8ad81fd7cc8edd0cee (patch) | |
tree | 73e73523a917234d16f82e22eb4ef1c765955488 /drivers | |
parent | 6278c5d8929f9dbf51017dad9e432ff7321501b9 (diff) | |
download | linux-f382898fabfa77dda6d77e8ad81fd7cc8edd0cee.tar.xz |
staging: comedi: das800: use cfc_handle_events()
Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().
Also, remove the clearing of the event, comedi_event() does that.
In the Kconfig, COMEDI_DAS800 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/das800.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/staging/comedi/drivers/das800.c b/drivers/staging/comedi/drivers/das800.c index 8c15929..a4fb3d6 100644 --- a/drivers/staging/comedi/drivers/das800.c +++ b/drivers/staging/comedi/drivers/das800.c @@ -521,10 +521,8 @@ static irqreturn_t das800_interrupt(int irq, void *d) if (fifo_overflow) { spin_unlock_irqrestore(&dev->spinlock, irq_flags); - das800_cancel(dev, s); async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA; - comedi_event(dev, s); - async->events = 0; + cfc_handle_events(dev, s); return IRQ_HANDLED; } @@ -540,8 +538,7 @@ static irqreturn_t das800_interrupt(int irq, void *d) das800_disable(dev); async->events |= COMEDI_CB_EOA; } - comedi_event(dev, s); - async->events = 0; + cfc_handle_events(dev, s); return IRQ_HANDLED; } |