return 0;
}
-static const void *addi_find_boardinfo(struct comedi_device *dev,
- struct pci_dev *pcidev)
-{
- const void *p = dev->driver->board_name;
- const struct addi_board *this_board;
- int i;
-
- for (i = 0; i < dev->driver->num_names; i++) {
- this_board = p;
- if (this_board->i_VendorId == pcidev->vendor &&
- this_board->i_DeviceId == pcidev->device)
- return this_board;
- p += dev->driver->offset;
- }
- return NULL;
-}
-
static int addi_auto_attach(struct comedi_device *dev,
unsigned long context_unused)
{
int ret, n_subdevices;
unsigned int dw_Dummy;
- if (!this_board) {
- /* The driver did not set the board_ptr, try finding it. */
- this_board = addi_find_boardinfo(dev, pcidev);
- if (!this_board)
- return -ENODEV;
- dev->board_ptr = this_board;
- }
dev->board_name = this_board->pc_DriverName;
devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL);