Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 35a8735d authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: pcl818: 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 5451274a
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -274,7 +274,6 @@ struct pcl818_private {
	unsigned char neverending_ai;	/*  if=1, then we do neverending record (you must use cancel()) */
	unsigned int ns_min;	/*  manimal allowed delay between samples (in us) for actual card */
	int i8253_osc_base;	/*  1/frequency of on board oscilator in ns */
	int irq_free;		/*  1=have allocated IRQ */
	int irq_blocked;	/*  1=IRQ now uses any subdev */
	int irq_was_now_closed;	/*  when IRQ finish, there's stored int818_mode for last interrupt */
	int ai_mode;		/*  who now uses IRQ - 1=AI1 int, 2=AI1 dma, 3=AI3 int, 4AI3 dma */
@@ -701,8 +700,7 @@ static irqreturn_t interrupt_pcl818(int irq, void *d)

	outb(0, dev->iobase + PCL818_CLRINT);	/* clear INT request */

	if ((!dev->irq) || (!devpriv->irq_free) || (!devpriv->irq_blocked)
	    || (!devpriv->ai_mode)) {
	if (!dev->irq || !devpriv->irq_blocked || !devpriv->ai_mode) {
		comedi_error(dev, "bad IRQ!");
		return IRQ_NONE;
	}
@@ -1230,10 +1228,8 @@ static int pcl818_attach(struct comedi_device *dev, struct comedi_devconfig *it)
	if ((1 << it->options[1]) & board->IRQbits) {
		ret = request_irq(it->options[1], interrupt_pcl818, 0,
				  dev->board_name, dev);
		if (ret == 0) {
		if (ret == 0)
			dev->irq = it->options[1];
			devpriv->irq_free = 1;
		}
	}

	devpriv->irq_blocked = 0;	/* number of subdevice which use IRQ */
@@ -1242,7 +1238,7 @@ static int pcl818_attach(struct comedi_device *dev, struct comedi_devconfig *it)
	/* grab our DMA */
	dma = 0;
	devpriv->dma = dma;
	if (!devpriv->irq_free)
	if (!dev->irq)
		goto no_dma;	/* if we haven't IRQ, we can't use DMA */
	if (board->DMAbits != 0) {	/* board support DMA */
		dma = it->options[2];