patch-2.3.37 linux/drivers/video/matroxfb.c

Next file: linux/drivers/video/offb.c
Previous file: linux/drivers/video/imsttfb.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.36/linux/drivers/video/matroxfb.c linux/drivers/video/matroxfb.c
@@ -2559,14 +2559,6 @@
 };
 #endif
 
-static struct pci_dev* pci_find(struct pci_dev* p) {
-	
-	DBG("pci_find")
-	
-	if (p) return p->next;
-	return pci_devices;
-}
-
 static void initMatrox(WPMINFO struct display* p) {
 	struct display_switch *swtmp;
 
@@ -6021,15 +6013,15 @@
 
 	if (disabled)
 		return -ENXIO; 
-	while ((pdev = pci_find(pdev)) != NULL) {
+	while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev))) {
 		struct board* b;
 		u_int8_t rev;
 		u_int16_t svid;
 		u_int16_t sid;
 
 		pci_read_config_byte(pdev, PCI_REVISION_ID, &rev);
-		pci_read_config_word(pdev, PCI_SUBSYSTEM_VENDOR_ID, &svid);
-		pci_read_config_word(pdev, PCI_SUBSYSTEM_ID, &sid);
+		svid = dev->subsystem_vendor;
+		sid = dev->subsystem_device;
 		for (b = dev_list; b->vendor; b++) {
 			if ((b->vendor != pdev->vendor) || (b->device != pdev->device) || (b->rev < rev)) continue;
 			if (b->svid)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)