struct pc236_board {
const char *name;
enum pc236_bustype bustype;
+ void (*intr_update_cb)(struct comedi_device *dev, bool enable);
};
struct pc236_private {
spin_lock_irqsave(&dev->spinlock, flags);
devpriv->enable_irq = 0;
- if (is_pci_board(thisboard))
- outl(PCI236_INTR_DISABLE, devpriv->lcr_iobase + PLX9052_INTCSR);
+ if (thisboard->intr_update_cb)
+ thisboard->intr_update_cb(dev, false);
spin_unlock_irqrestore(&dev->spinlock, flags);
}
spin_lock_irqsave(&dev->spinlock, flags);
devpriv->enable_irq = 1;
- if (is_pci_board(thisboard))
- outl(PCI236_INTR_ENABLE, devpriv->lcr_iobase + PLX9052_INTCSR);
+ if (thisboard->intr_update_cb)
+ thisboard->intr_update_cb(dev, true);
spin_unlock_irqrestore(&dev->spinlock, flags);
}
return pc236_common_attach(dev, dev->iobase, it->options[1], 0);
}
+static void pci236_intr_update_cb(struct comedi_device *dev, bool enable)
+{
+ struct pc236_private *devpriv = dev->private;
+
+ outl(enable ? PCI236_INTR_ENABLE : PCI236_INTR_DISABLE,
+ devpriv->lcr_iobase + PLX9052_INTCSR);
+}
+
static const struct pc236_board pc236_pci_board = {
.name = "pci236",
+ .intr_update_cb = pci236_intr_update_cb,
.bustype = pci_bustype,
};