if (ret)
return ret;
- ret = comedi_alloc_subdevices(dev, 6);
- if (ret)
- return ret;
-
- dev->irq = pcidev->irq;
-
- /* set up interrupt handler */
- if (dev->irq == 0) {
- printk(KERN_ERR " unknown irq (bad)\n");
- } else {
- ret = request_irq(dev->irq, s626_irq_handler, IRQF_SHARED,
+ if (pcidev->irq) {
+ ret = request_irq(pcidev->irq, s626_irq_handler, IRQF_SHARED,
dev->board_name, dev);
- if (ret < 0) {
- printk(KERN_ERR " irq not available\n");
- dev->irq = 0;
- }
+ if (ret == 0)
+ dev->irq = pcidev->irq;
}
+ ret = comedi_alloc_subdevices(dev, 6);
+ if (ret)
+ return ret;
+
s = dev->subdevices + 0;
/* analog input subdevice */
dev->read_subdev = s;