Commit 94349cb9 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: pcl816: rename 'irq_blocked' in private data

This member in the private data is a flag that indicates that an analog
input async command is currently running. Rename it to make this clear.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent efd5b7b5
...@@ -122,7 +122,7 @@ struct pcl816_private { ...@@ -122,7 +122,7 @@ struct pcl816_private {
unsigned int ai_poll_ptr; /* how many sampes transfer poll */ unsigned int ai_poll_ptr; /* how many sampes transfer poll */
unsigned int divisor1; unsigned int divisor1;
unsigned int divisor2; unsigned int divisor2;
unsigned int irq_blocked:1; unsigned int ai_cmd_running:1;
unsigned int irq_was_now_closed:1; unsigned int irq_was_now_closed:1;
unsigned int ai_neverending:1; unsigned int ai_neverending:1;
}; };
...@@ -370,7 +370,7 @@ static irqreturn_t interrupt_pcl816(int irq, void *d) ...@@ -370,7 +370,7 @@ static irqreturn_t interrupt_pcl816(int irq, void *d)
} }
outb(0, dev->iobase + PCL816_CLRINT); /* clear INT request */ outb(0, dev->iobase + PCL816_CLRINT); /* clear INT request */
if (!dev->irq || !devpriv->irq_blocked || !devpriv->int816_mode) { if (!dev->irq || !devpriv->ai_cmd_running || !devpriv->int816_mode) {
if (devpriv->irq_was_now_closed) { if (devpriv->irq_was_now_closed) {
devpriv->irq_was_now_closed = 0; devpriv->irq_was_now_closed = 0;
/* comedi_error(dev,"last IRQ.."); */ /* comedi_error(dev,"last IRQ.."); */
...@@ -471,7 +471,7 @@ static int pcl816_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) ...@@ -471,7 +471,7 @@ static int pcl816_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
unsigned int dma_flags, bytes, dmairq; unsigned int dma_flags, bytes, dmairq;
unsigned int seglen; unsigned int seglen;
if (devpriv->irq_blocked) if (devpriv->ai_cmd_running)
return -EBUSY; return -EBUSY;
pcl816_start_pacer(dev, false); pcl816_start_pacer(dev, false);
...@@ -484,7 +484,7 @@ static int pcl816_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) ...@@ -484,7 +484,7 @@ static int pcl816_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
devpriv->ai_act_scan = 0; devpriv->ai_act_scan = 0;
s->async->cur_chan = 0; s->async->cur_chan = 0;
devpriv->irq_blocked = 1; devpriv->ai_cmd_running = 1;
devpriv->ai_poll_ptr = 0; devpriv->ai_poll_ptr = 0;
devpriv->irq_was_now_closed = 0; devpriv->irq_was_now_closed = 0;
...@@ -601,7 +601,7 @@ static int pcl816_ai_cancel(struct comedi_device *dev, ...@@ -601,7 +601,7 @@ static int pcl816_ai_cancel(struct comedi_device *dev,
{ {
struct pcl816_private *devpriv = dev->private; struct pcl816_private *devpriv = dev->private;
if (devpriv->irq_blocked) { if (devpriv->ai_cmd_running) {
switch (devpriv->int816_mode) { switch (devpriv->int816_mode) {
case INT_TYPE_AI1_DMA: case INT_TYPE_AI1_DMA:
case INT_TYPE_AI3_DMA: case INT_TYPE_AI3_DMA:
...@@ -627,7 +627,7 @@ static int pcl816_ai_cancel(struct comedi_device *dev, ...@@ -627,7 +627,7 @@ static int pcl816_ai_cancel(struct comedi_device *dev,
/* Stop A/D */ /* Stop A/D */
outb(0, dev->iobase + PCL816_CONTROL); outb(0, dev->iobase + PCL816_CONTROL);
devpriv->irq_blocked = 0; devpriv->ai_cmd_running = 0;
devpriv->irq_was_now_closed = 1; devpriv->irq_was_now_closed = 1;
devpriv->int816_mode = 0; devpriv->int816_mode = 0;
/* s->busy = 0; */ /* s->busy = 0; */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment