diff --git a/[refs] b/[refs] index a66db0f66030..cb43e9af63dd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f0bd6d357527ed40c84e75f1f3137ea944f179db +refs/heads/master: b8acd7750a2366216d9ec81f96b0594f6bb86707 diff --git a/trunk/drivers/staging/comedi/drivers/contec_pci_dio.c b/trunk/drivers/staging/comedi/drivers/contec_pci_dio.c index e4d37fc0e640..b75a8afce5eb 100644 --- a/trunk/drivers/staging/comedi/drivers/contec_pci_dio.c +++ b/trunk/drivers/staging/comedi/drivers/contec_pci_dio.c @@ -101,22 +101,25 @@ static struct pci_dev *contec_find_pci_dev(struct comedi_device *dev, struct comedi_devconfig *it) { struct pci_dev *pcidev = NULL; + int bus = it->options[0]; + int slot = it->options[1]; for_each_pci_dev(pcidev) { - if (pcidev->vendor == PCI_VENDOR_ID_CONTEC && - pcidev->device == PCI_DEVICE_ID_PIO1616L) { - if (it->options[0] || it->options[1]) { - /* Check bus and slot. */ - if (it->options[0] != pcidev->bus->number || - it->options[1] != PCI_SLOT(pcidev->devfn)) { - continue; - } - } - dev->board_ptr = contec_boards + 0; - return pcidev; + if (bus || slot) { + if (bus != pcidev->bus->number || + slot != PCI_SLOT(pcidev->devfn)) + continue; } + if (pcidev->vendor != PCI_VENDOR_ID_CONTEC || + pcidev->device != PCI_DEVICE_ID_PIO1616L) + continue; + + dev->board_ptr = contec_boards + 0; + return pcidev; } - printk("card not present!\n"); + dev_err(dev->class_dev, + "No supported board found! (req. bus %d, slot %d)\n", + bus, slot); return NULL; }