From: H Hartley Sweeten Date: Tue, 3 Dec 2013 19:07:15 +0000 (-0700) Subject: staging: comedi: pcl818: remove 'irq_free' from private data X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=35a8735d1cea548c12ca00e38fb56f91d053035b;p=linux-beck.git 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: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/staging/comedi/drivers/pcl818.c index cacdca0983bb..3dac1dd1372f 100644 --- a/drivers/staging/comedi/drivers/pcl818.c +++ b/drivers/staging/comedi/drivers/pcl818.c @@ -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];