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

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

staging: comedi: ni_labpc: allow board to attach without interrupt



If the interrupt is not available this driver will still work
with command support disabled for the analog input subdevice.

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 f06563f0
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -1661,20 +1661,16 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase,
		devpriv->write_byte(devpriv->cmd6, dev->iobase + CMD6_REG);
	}

	/* grab our IRQ */
	if (irq) {
		isr_flags = 0;
		if (board->bustype == pci_bustype ||
		    board->bustype == pcmcia_bustype)
			isr_flags |= IRQF_SHARED;
		if (request_irq(irq, labpc_interrupt, isr_flags,
				dev->board_name, dev)) {
			dev_err(dev->class_dev, "unable to allocate irq %u\n",
				irq);
			return -EINVAL;
		}
	}
		ret = request_irq(irq, labpc_interrupt, isr_flags,
				  dev->board_name, dev);
		if (ret == 0)
			dev->irq = irq;
	}

#ifdef CONFIG_ISA_DMA_API
	/* grab dma channel */