return insn->n;
}
-static int apci1032_attach_pci(struct comedi_device *dev,
- struct pci_dev *pcidev)
+static int __devinit apci1032_auto_attach(struct comedi_device *dev,
+ unsigned long context_unused)
{
+ struct pci_dev *pcidev = comedi_to_pci_dev(dev);
struct apci1032_private *devpriv;
struct comedi_subdevice *s;
int ret;
static struct comedi_driver apci1032_driver = {
.driver_name = "addi_apci_1032",
.module = THIS_MODULE,
- .attach_pci = apci1032_attach_pci,
+ .auto_attach = apci1032_auto_attach,
.detach = apci1032_detach,
};
return NULL;
}
-static int apci1710_attach_pci(struct comedi_device *dev,
- struct pci_dev *pcidev)
+static int __devinit apci1710_auto_attach(struct comedi_device *dev,
+ unsigned long context_unused)
{
+ struct pci_dev *pcidev = comedi_to_pci_dev(dev);
const struct addi_board *this_board;
struct addi_private *devpriv;
struct comedi_subdevice *s;
static struct comedi_driver apci1710_driver = {
.driver_name = "addi_apci_1710",
.module = THIS_MODULE,
- .attach_pci = apci1710_attach_pci,
+ .auto_attach = apci1710_auto_attach,
.detach = apci1710_detach,
};
return NULL;
}
-static int apci3120_attach_pci(struct comedi_device *dev,
- struct pci_dev *pcidev)
+static int __devinit apci3120_auto_attach(struct comedi_device *dev,
+ unsigned long context_unused)
{
+ struct pci_dev *pcidev = comedi_to_pci_dev(dev);
const struct addi_board *this_board;
struct addi_private *devpriv;
struct comedi_subdevice *s;
static struct comedi_driver apci3120_driver = {
.driver_name = "addi_apci_3120",
.module = THIS_MODULE,
- .attach_pci = apci3120_attach_pci,
+ .auto_attach = apci3120_auto_attach,
.detach = apci3120_detach,
};