mirror of https://gitee.com/openkylin/linux.git
staging: comedi: addi_apci_3120: use async->events to report hardware error
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>
This commit is contained in:
parent
18e3b50367
commit
a68809bb8d
|
@ -50,7 +50,7 @@ static void apci3120_interrupt_dma(int irq, void *d)
|
||||||
dev_err(dev->class_dev, "Interrupted DMA transfer!\n");
|
dev_err(dev->class_dev, "Interrupted DMA transfer!\n");
|
||||||
if (samplesinbuf & 1) {
|
if (samplesinbuf & 1) {
|
||||||
dev_err(dev->class_dev, "Odd count of bytes in DMA ring!\n");
|
dev_err(dev->class_dev, "Odd count of bytes in DMA ring!\n");
|
||||||
apci3120_cancel(dev, s);
|
async->events |= COMEDI_CB_ERROR;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
samplesinbuf = samplesinbuf >> 1; /* number of received samples */
|
samplesinbuf = samplesinbuf >> 1; /* number of received samples */
|
||||||
|
|
Loading…
Reference in New Issue