Skip to contentSkip to conversation

staging: comedi: remove pci_is_enabled() tests

PATCH New H Hartley Sweeten 1 participant 1 message Jul 20, 2012 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 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.

---
 drivers/staging/comedi/drivers/adv_pci1710.c | 3 ---
 drivers/staging/comedi/drivers/adv_pci1723.c | 2 --
 drivers/staging/comedi/drivers/adv_pci_dio.c | 2 --
 3 files changed, 7 deletions(-)
drivers/staging/comedi/drivers/adv_pci1710.c +0 -3
index 3198660..6b4d0d6 100644
@@ -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) {
drivers/staging/comedi/drivers/adv_pci1723.c +0 -2
index da5ee69..dfde0f6 100644
@@ -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,
drivers/staging/comedi/drivers/adv_pci_dio.c +0 -2
index 97f06dc..2d4cb7f 100644
@@ -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;
Signature · 1 line
1.7.11