mirror of
https://github.com/torvalds/linux.git
synced 2024-12-03 17:41:22 +00:00
staging: comedi: remove pci_is_enabled() tests
As mentioned by Ian Abbott, the comedi pci drivers that try to locate an unused pci device with the pci_is_enabled() test might actually skip over a perfectly good unused device. This test is also not consistent with the other comedi pci drivers. Remove the test from all the comedi pci drivers. Reported-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
0d7614f09c
commit
8258d3923c
@ -1349,9 +1349,6 @@ static struct pci_dev *pci1710_find_pci_dev(struct comedi_device *dev,
|
||||
}
|
||||
if (pcidev->vendor != PCI_VENDOR_ID_ADVANTECH)
|
||||
continue;
|
||||
if (pci_is_enabled(pcidev))
|
||||
continue;
|
||||
|
||||
if (strcmp(this_board->name, DRV_NAME) == 0) {
|
||||
for (i = 0; i < ARRAY_SIZE(boardtypes); ++i) {
|
||||
if (pcidev->device == boardtypes[i].device_id) {
|
||||
|
@ -301,8 +301,6 @@ static struct pci_dev *pci1723_find_pci_dev(struct comedi_device *dev,
|
||||
}
|
||||
if (pcidev->vendor != PCI_VENDOR_ID_ADVANTECH)
|
||||
continue;
|
||||
if (pci_is_enabled(pcidev))
|
||||
continue;
|
||||
return pcidev;
|
||||
}
|
||||
dev_err(dev->class_dev,
|
||||
|
@ -1064,8 +1064,6 @@ static struct pci_dev *pci_dio_find_pci_dev(struct comedi_device *dev,
|
||||
slot != PCI_SLOT(pcidev->devfn))
|
||||
continue;
|
||||
}
|
||||
if (pci_is_enabled(pcidev))
|
||||
continue;
|
||||
for (i = 0; i < ARRAY_SIZE(boardtypes); ++i) {
|
||||
if (boardtypes[i].vendor_id != pcidev->vendor)
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user