[PATCH 100/108] staging: comedi: addi_apci_3120: use async->events to report hardware error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
index 396aa47..505901c 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
@@ -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 */
-- 
2.0.3

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux