staging: comedi: das800: use cfc_handle_events()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Sat, 8 Mar 2014 00:31:31 +0000 (17:31 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Mar 2014 20:55:54 +0000 (13:55 -0700)
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>
drivers/staging/comedi/drivers/das800.c

index 8c15929811b6bc88020be32d85629cc087559fd7..a4fb3d64420c9ce27f310dc3f9c383ef7c317b9f 100644 (file)
@@ -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;
 }
 
This page took 0.026262 seconds and 5 git commands to generate.