staging: comedi: addi_apci_3120: use async->events to report hardware error
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 4 Nov 2014 17:55:24 +0000 (10:55 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Nov 2014 17:34:05 +0000 (09:34 -0800)
In apci3120_interrupt_dma(), use the async->events to report the hardware
error and allow the core to (*cancel) the command instead of calling the
(*cancel) function directly.

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/addi-data/hwdrv_apci3120.c

index 396aa47a6b08a1063104b77deca1402237e0f6c9..505901c6ec2a97992617b035b8625b37fb5dfb32 100644 (file)
@@ -50,7 +50,7 @@ static void apci3120_interrupt_dma(int irq, void *d)
                dev_err(dev->class_dev, "Interrupted DMA transfer!\n");
        if (samplesinbuf & 1) {
                dev_err(dev->class_dev, "Odd count of bytes in DMA ring!\n");
-               apci3120_cancel(dev, s);
+               async->events |= COMEDI_CB_ERROR;
                return;
        }
        samplesinbuf = samplesinbuf >> 1;       /*  number of received samples */