diff --git a/board_enable.c b/board_enable.c
index 5f444df..4cad857 100644
--- a/board_enable.c
+++ b/board_enable.c
@@ -2658,17 +2658,17 @@
 		if (board->phase != phase)
 			continue;
 
-		if (!pci_card_find(board->first_vendor, board->first_device,
-				   board->first_card_vendor,
-				   board->first_card_device))
+		if (!pcidev_card_find(board->first_vendor, board->first_device,
+					board->first_card_vendor,
+					board->first_card_device))
 			continue;
 
 		if (board->second_vendor) {
 			if (board->second_card_vendor) {
-				if (!pci_card_find(board->second_vendor,
-						   board->second_device,
-						   board->second_card_vendor,
-						   board->second_card_device))
+				if (!pcidev_card_find(board->second_vendor,
+							board->second_device,
+							board->second_card_vendor,
+							board->second_card_device))
 					continue;
 			} else {
 				if (!pci_dev_find(board->second_vendor,
diff --git a/internal.c b/internal.c
index 86ac35a..f412dd6 100644
--- a/internal.c
+++ b/internal.c
@@ -37,25 +37,6 @@
 	return pcidev_scandev(&filter, NULL);
 }
 
-struct pci_dev *pci_card_find(uint16_t vendor, uint16_t device,
-			      uint16_t card_vendor, uint16_t card_device)
-{
-	struct pci_dev *temp = NULL;
-	struct pci_filter filter;
-
-	pci_filter_init(NULL, &filter);
-	filter.vendor = vendor;
-	filter.device = device;
-
-	while ((temp = pcidev_scandev(&filter, temp))) {
-		if ((card_vendor == pci_read_word(temp, PCI_SUBSYSTEM_VENDOR_ID))
-		    && (card_device == pci_read_word(temp, PCI_SUBSYSTEM_ID)))
-			return temp;
-	}
-
-	return NULL;
-}
-
 int force_boardenable = 0;
 int force_boardmismatch = 0;
 
diff --git a/pcidev.c b/pcidev.c
index 3515871..02b39b3 100644
--- a/pcidev.c
+++ b/pcidev.c
@@ -160,6 +160,25 @@
 	return NULL;
 }
 
+struct pci_dev *pcidev_card_find(uint16_t vendor, uint16_t device,
+				 uint16_t card_vendor, uint16_t card_device)
+{
+	struct pci_dev *temp = NULL;
+	struct pci_filter filter;
+
+	pci_filter_init(NULL, &filter);
+	filter.vendor = vendor;
+	filter.device = device;
+
+	while ((temp = pcidev_scandev(&filter, temp))) {
+		if ((card_vendor == pci_read_word(temp, PCI_SUBSYSTEM_VENDOR_ID))
+		    && (card_device == pci_read_word(temp, PCI_SUBSYSTEM_ID)))
+			return temp;
+	}
+
+	return NULL;
+}
+
 struct pci_dev *pcidev_find_vendorclass(uint16_t vendor, uint16_t devclass)
 {
 	struct pci_dev *temp = NULL;
diff --git a/programmer.h b/programmer.h
index 763ed67..43d967c 100644
--- a/programmer.h
+++ b/programmer.h
@@ -124,6 +124,7 @@
 struct pci_dev *pcidev_init(const struct dev_entry *devs, int bar);
 struct pci_dev *pcidev_scandev(struct pci_filter *filter, struct pci_dev *start);
 struct pci_dev *pcidev_find_vendorclass(uint16_t vendor, uint16_t devclass);
+struct pci_dev *pcidev_card_find(uint16_t vendor, uint16_t device, uint16_t card_vendor, uint16_t card_device);
 /* rpci_write_* are reversible writes. The original PCI config space register
  * contents will be restored on shutdown.
  * To clone the pci_dev instances internally, the `pacc` global
@@ -258,8 +259,6 @@
 #endif
 #if NEED_PCI == 1
 struct pci_dev *pci_dev_find(uint16_t vendor, uint16_t device);
-struct pci_dev *pci_card_find(uint16_t vendor, uint16_t device,
-			      uint16_t card_vendor, uint16_t card_device);
 #endif
 #if CONFIG_INTERNAL == 1
 extern int is_laptop;
