Commit 6a8f6de1 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: pcl816: remove 'irq_free' from private data

This member of the private data is not needed. We can check if
dev->irq is none zero instead. Remove it.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f95321f3
...@@ -128,7 +128,6 @@ struct pcl816_private { ...@@ -128,7 +128,6 @@ struct pcl816_private {
unsigned int ai_scans; /* len of scanlist */ unsigned int ai_scans; /* len of scanlist */
unsigned char ai_neverending; /* if=1, then we do neverending record (you must use cancel()) */ unsigned char ai_neverending; /* if=1, then we do neverending record (you must use cancel()) */
int irq_free; /* 1=have allocated IRQ */
int irq_blocked; /* 1=IRQ now uses any subdev */ int irq_blocked; /* 1=IRQ now uses any subdev */
int irq_was_now_closed; /* when IRQ finish, there's stored int816_mode for last interrupt */ int irq_was_now_closed; /* when IRQ finish, there's stored int816_mode for last interrupt */
int int816_mode; /* who now uses IRQ - 1=AI1 int, 2=AI1 dma, 3=AI3 int, 4AI3 dma */ int int816_mode; /* who now uses IRQ - 1=AI1 int, 2=AI1 dma, 3=AI3 int, 4AI3 dma */
...@@ -382,8 +381,7 @@ static irqreturn_t interrupt_pcl816(int irq, void *d) ...@@ -382,8 +381,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_free || !devpriv->irq_blocked || if (!dev->irq || !devpriv->irq_blocked || !devpriv->int816_mode) {
!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.."); */
...@@ -875,10 +873,8 @@ static int pcl816_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -875,10 +873,8 @@ static int pcl816_attach(struct comedi_device *dev, struct comedi_devconfig *it)
if ((1 << it->options[1]) & board->IRQbits) { if ((1 << it->options[1]) & board->IRQbits) {
ret = request_irq(it->options[1], interrupt_pcl816, 0, ret = request_irq(it->options[1], interrupt_pcl816, 0,
dev->board_name, dev); dev->board_name, dev);
if (ret == 0) { if (ret == 0)
dev->irq = it->options[1]; dev->irq = it->options[1];
devpriv->irq_free = 1;
}
} }
devpriv->irq_blocked = 0; /* number of subdevice which use IRQ */ devpriv->irq_blocked = 0; /* number of subdevice which use IRQ */
...@@ -887,7 +883,7 @@ static int pcl816_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -887,7 +883,7 @@ static int pcl816_attach(struct comedi_device *dev, struct comedi_devconfig *it)
/* grab our DMA */ /* grab our DMA */
dma = 0; dma = 0;
devpriv->dma = dma; devpriv->dma = dma;
if (!devpriv->irq_free) if (!dev->irq)
goto no_dma; /* if we haven't IRQ, we can't use DMA */ goto no_dma; /* if we haven't IRQ, we can't use DMA */
if (board->DMAbits != 0) { /* board support DMA */ if (board->DMAbits != 0) { /* board support DMA */
......
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