staging: comedi: cb_pcidas: use comedi_cmd pointer
Use the local variable to access the comedi_cmd as a pointer instead of getting to it from the comedi_async pointer. 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
1eb9cf92da
commit
bedd62fc6d
|
@ -1321,7 +1321,7 @@ static void handle_ao_interrupt(struct comedi_device *dev, unsigned int status)
|
|||
num_points * sizeof(short));
|
||||
num_points = num_bytes / sizeof(short);
|
||||
|
||||
if (async->cmd.stop_src == TRIG_COUNT)
|
||||
if (cmd->stop_src == TRIG_COUNT)
|
||||
devpriv->ao_count -= num_points;
|
||||
/* write data to board's fifo */
|
||||
outsw(devpriv->ao_registers + DACDATA, devpriv->ao_buffer,
|
||||
|
@ -1343,6 +1343,7 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d)
|
|||
struct cb_pcidas_private *devpriv = dev->private;
|
||||
struct comedi_subdevice *s = dev->read_subdev;
|
||||
struct comedi_async *async;
|
||||
struct comedi_cmd *cmd;
|
||||
int status, s5933_status;
|
||||
int half_fifo = thisboard->fifo_size / 2;
|
||||
unsigned int num_samples, i;
|
||||
|
@ -1353,6 +1354,7 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d)
|
|||
return IRQ_NONE;
|
||||
|
||||
async = s->async;
|
||||
cmd = &async->cmd;
|
||||
|
||||
s5933_status = inl(devpriv->s5933_config + AMCC_OP_REG_INTCSR);
|
||||
|
||||
|
@ -1375,7 +1377,7 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d)
|
|||
if (status & ADHFI) {
|
||||
/* read data */
|
||||
num_samples = half_fifo;
|
||||
if (async->cmd.stop_src == TRIG_COUNT &&
|
||||
if (cmd->stop_src == TRIG_COUNT &&
|
||||
num_samples > devpriv->count) {
|
||||
num_samples = devpriv->count;
|
||||
}
|
||||
|
@ -1384,7 +1386,7 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d)
|
|||
cfc_write_array_to_buffer(s, devpriv->ai_buffer,
|
||||
num_samples * sizeof(short));
|
||||
devpriv->count -= num_samples;
|
||||
if (async->cmd.stop_src == TRIG_COUNT && devpriv->count == 0)
|
||||
if (cmd->stop_src == TRIG_COUNT && devpriv->count == 0)
|
||||
async->events |= COMEDI_CB_EOA;
|
||||
/* clear half-full interrupt latch */
|
||||
spin_lock_irqsave(&dev->spinlock, flags);
|
||||
|
@ -1399,7 +1401,7 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d)
|
|||
INT_ADCFIFO)) == 0)
|
||||
break;
|
||||
cfc_write_to_buffer(s, inw(devpriv->adc_fifo));
|
||||
if (async->cmd.stop_src == TRIG_COUNT &&
|
||||
if (cmd->stop_src == TRIG_COUNT &&
|
||||
--devpriv->count == 0) {
|
||||
/* end of acquisition */
|
||||
async->events |= COMEDI_CB_EOA;
|
||||
|
|
Loading…
Reference in New Issue