patch-2.3.40 linux/drivers/pci/helper.c

Next file: linux/drivers/pci/pci.c
Previous file: linux/drivers/pci/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.39/linux/drivers/pci/helper.c linux/drivers/pci/helper.c
@@ -1,69 +0,0 @@
-/*
- * $Id$
- *
- * drivers/pci/helper.c
- *
- * Copyright 1999 Jeff Garzik <jgarzik@mandrakesoft.com>
- * This software is free.  See the file COPYING for licensing details.
- *
- */
-
-#include <linux/kernel.h>
-#include <linux/pci.h>
-
-
-int pci_simple_probe (const struct pci_simple_probe_entry *list,
-		      size_t match_limit, pci_simple_probe_callback cb,
-		      void *drvr_data)
-{
-	struct pci_dev *dev;
-	const struct pci_simple_probe_entry *ent;
-	size_t matches = 0;
-	unsigned short vendor, device;
-	int rc;
-
-	if (!list || !cb)
-		return -1;
-
-	dev = pci_find_device (PCI_ANY_ID, PCI_ANY_ID, NULL);
-	while (dev) {
-		ent = list;
-		while (ent->vendor && ent->device) {
-			vendor = ent->vendor;
-			device = ent->device;
-
-			if (((vendor != 0xFFFF) &&
-			     (vendor != dev->vendor)) ||
-			    ((device != 0xFFFF) &&
-			     (device != dev->device))) {
-			     	ent++;
-				continue;
-			}
-			    
-			if (((ent->subsys_vendor) &&
-			     (ent->subsys_vendor != dev->subsystem_vendor)) ||
-			    ((ent->subsys_device) &&
-			     (ent->subsys_device != dev->subsystem_device))) {
-			     	ent++;
-				continue;
-			}
-			    
-			rc = (* cb) (dev, matches, ent, drvr_data);
-			if (rc < 0)
-				return rc;
-
-			matches++;
-
-			if (match_limit && match_limit == matches)
-				return matches;
-
-			break; /* stop list search on first match */
-		}
-
-		dev = pci_find_device (PCI_ANY_ID, PCI_ANY_ID, dev);
-	}
-
-	return matches;
-}
-
-

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