Remove vendorid parameter from pcidev_init()

Simplify pcidev_init by killing the vendorid parameter which was pretty
useless anyway since it was present in the pcidevs parameter as well.

This also allows us to handle multiple programmers with different vendor
IDs in the same driver.

Fix compilation of flashrom with only the nicrealtek driver.

Corresponding to flashrom svn r1274.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
diff --git a/pcidev.c b/pcidev.c
index 5eddf79..e498014 100644
--- a/pcidev.c
+++ b/pcidev.c
@@ -188,8 +188,7 @@
 	return 0;
 }
 
-uintptr_t pcidev_init(uint16_t vendor_id, int bar,
-		     const struct pcidev_status *devs)
+uintptr_t pcidev_init(int bar, const struct pcidev_status *devs)
 {
 	struct pci_dev *dev;
 	struct pci_filter filter;
@@ -203,8 +202,7 @@
 	pci_scan_bus(pacc);     /* We want to get the list of devices */
 	pci_filter_init(pacc, &filter);
 
-	/* Filter by vendor and also bb:dd.f (if supplied by the user). */
-	filter.vendor = vendor_id;
+	/* Filter by bb:dd.f (if supplied by the user). */
 	pcidev_bdf = extract_programmer_param("pci");
 	if (pcidev_bdf != NULL) {
 		if ((msg = pci_filter_parse_slot(&filter, pcidev_bdf))) {
@@ -216,6 +214,9 @@
 
 	for (dev = pacc->devices; dev; dev = dev->next) {
 		if (pci_filter_match(&filter, dev)) {
+			/* FIXME: We should count all matching devices, not
+			 * just those with a valid BAR.
+			 */
 			if ((addr = pcidev_validate(dev, bar, devs)) != 0) {
 				curaddr = addr;
 				pcidev_dev = dev;