struct pc236_board {
const char *name;
- unsigned short devid;
enum pc236_bustype bustype;
};
},
};
-static const struct pc236_board pc236_pci_boards[] = {
- {
- .name = "pci236",
- .devid = PCI_DEVICE_ID_AMPLICON_PCI236,
- .bustype = pci_bustype,
- },
+static const struct pc236_board pc236_pci_board = {
+ .name = "pci236",
+ .bustype = pci_bustype,
};
struct pc236_private {
return DO_PCI && board->bustype == pci_bustype;
}
-/*
- * This function looks for a board matching the supplied PCI device.
- */
-static const struct pc236_board *pc236_find_pci_board(struct pci_dev *pci_dev)
-{
- unsigned int i;
-
- for (i = 0; i < ARRAY_SIZE(pc236_pci_boards); i++)
- if (pci_dev->device == pc236_pci_boards[i].devid)
- return &pc236_pci_boards[i];
- return NULL;
-}
-
/*
* This function is called to mark the interrupt as disabled (no command
* configured on subdevice 1) and to physically disable the interrupt
if (!devpriv)
return -ENOMEM;
- dev->board_ptr = pc236_find_pci_board(pci_dev);
- if (dev->board_ptr == NULL) {
- dev_err(dev->class_dev, "BUG! cannot determine board type!\n");
- return -EINVAL;
- }
+ dev->board_ptr = &pc236_pci_board;
ret = comedi_pci_enable(dev);
if (ret)
return ret;