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

staging: comedi: ni_pcimio: tidy up the irq request

The irq is only needed to support async commands. Tidy up the
code that does the request_irq() and remove the noise.
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 18a764ce
...@@ -1469,6 +1469,7 @@ static int pcimio_auto_attach(struct comedi_device *dev, ...@@ -1469,6 +1469,7 @@ static int pcimio_auto_attach(struct comedi_device *dev,
struct pci_dev *pcidev = comedi_to_pci_dev(dev); struct pci_dev *pcidev = comedi_to_pci_dev(dev);
const struct ni_board_struct *board = NULL; const struct ni_board_struct *board = NULL;
struct ni_private *devpriv; struct ni_private *devpriv;
unsigned int irq;
int ret; int ret;
if (context < ARRAY_SIZE(ni_boards)) if (context < ARRAY_SIZE(ni_boards))
...@@ -1530,18 +1531,12 @@ static int pcimio_auto_attach(struct comedi_device *dev, ...@@ -1530,18 +1531,12 @@ static int pcimio_auto_attach(struct comedi_device *dev,
if (board->reg_type == ni_reg_6143) if (board->reg_type == ni_reg_6143)
init_6143(dev); init_6143(dev);
dev->irq = mite_irq(devpriv->mite); irq = mite_irq(devpriv->mite);
if (irq) {
if (dev->irq == 0) { ret = request_irq(irq, ni_E_interrupt, NI_E_IRQ_FLAGS,
pr_warn("unknown irq (bad)\n"); dev->board_name, dev);
} else { if (ret == 0)
pr_debug("( irq = %u )\n", dev->irq); dev->irq = irq;
ret = request_irq(dev->irq, ni_E_interrupt, NI_E_IRQ_FLAGS,
DRV_NAME, dev);
if (ret < 0) {
pr_warn("irq not available\n");
dev->irq = 0;
}
} }
ret = ni_E_init(dev); ret = ni_E_init(dev);
......
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