From a512842b291fa4532673f89bb238d27c8814f248 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Wed, 30 Apr 2008 13:46:26 +0000 Subject: [PATCH] Ignore data and data_len in comedi_cmd. --- comedi/drivers/s626.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/comedi/drivers/s626.c b/comedi/drivers/s626.c index 1bdeec3a..8d25a781 100644 --- a/comedi/drivers/s626.c +++ b/comedi/drivers/s626.c @@ -971,10 +971,8 @@ static irqreturn_t s626_irq_handler(int irq, void *d PT_REGS_ARG) enc_private *k; unsigned long flags; int32_t *readaddr; - uint32_t irqtype, irqstatus, datacount; - int kernel_transfer = 0; + uint32_t irqtype, irqstatus; int i = 0; - sampl_t *databuf = NULL; sampl_t tempdata; uint8_t group; uint16_t irqbit; @@ -1010,13 +1008,6 @@ static irqreturn_t s626_irq_handler(int irq, void *d PT_REGS_ARG) s = dev->subdevices; cmd = &(s->async->cmd); - // verify if data buffer exists - if (s->async->cmd.data != NULL) { - DEBUG("s626_irq_handler: Kernel transfer asserted\n"); - kernel_transfer = 1; - databuf = s->async->cmd.data; - datacount = s->async->cmd.data_len; - } // Init ptr to DMA buffer that holds new ADC data. We skip the // first uint16_t in the buffer because it contains junk data from // the final ADC of the previous poll list scan. @@ -1029,17 +1020,6 @@ static irqreturn_t s626_irq_handler(int irq, void *d PT_REGS_ARG) tempdata = s626_ai_reg_to_uint((int)*readaddr); readaddr++; - if (kernel_transfer) { - //send buffer overflow event - DEBUG("s626_irq_handler: in kernel transfer...\n"); - if (datacount < 0) { - s->async->events |= COMEDI_CB_OVERFLOW; - } else { - datacount--; - // transfer data - *databuf++ = tempdata; - } - } //put data into read buffer // comedi_buf_put(s->async, tempdata); if (cfc_write_to_buffer(s, tempdata) == 0) -- 2.26.2