int __init init_module(void) { mite_init(); mite_list_devices(); return 0; }
static int nidio_find_device(struct comedi_device *dev, int bus, int slot) { struct mite_struct *mite; int i; for (mite = mite_devices; mite; mite = mite->next) { if (mite->used) continue; if (bus || slot) { if (bus != mite->pcidev->bus->number || slot != PCI_SLOT(mite->pcidev->devfn)) continue; } for (i = 0; i < n_nidio_boards; i++) { if (mite_device_id(mite) == nidio_boards[i].dev_id) { dev->board_ptr = nidio_boards + i; devpriv->mite = mite; return 0; } } } printk("no device found\n"); mite_list_devices(); return -EIO; }