diff --git a/dummyflasher.c b/dummyflasher.c
index 4cd9658..903f88b 100644
--- a/dummyflasher.c
+++ b/dummyflasher.c
@@ -24,45 +24,43 @@
 #include <sys/types.h>
 #include "flash.h"
 
-char *dummytype = NULL;
-
 int dummy_init(void)
 {
 	int i;
 	printf_debug("%s\n", __func__);
 
 	/* "all" is equivalent to specifying no type. */
-	if (dummytype && (!strcmp(dummytype, "all"))) {
-		free(dummytype);
-		dummytype = NULL;
+	if (programmer_param && (!strcmp(programmer_param, "all"))) {
+		free(programmer_param);
+		programmer_param = NULL;
 	}
-	if (!dummytype)
-		dummytype = strdup("parallel,lpc,fwh,spi");
+	if (!programmer_param)
+		programmer_param = strdup("parallel,lpc,fwh,spi");
 	/* Convert the parameters to lowercase. */
-	for (i = 0; dummytype[i] != '\0'; i++)
-		dummytype[i] = (char)tolower(dummytype[i]);
+	for (i = 0; programmer_param[i] != '\0'; i++)
+		programmer_param[i] = (char)tolower(programmer_param[i]);
 
 	buses_supported = CHIP_BUSTYPE_NONE;
-	if (strstr(dummytype, "parallel")) {
+	if (strstr(programmer_param, "parallel")) {
 		buses_supported |= CHIP_BUSTYPE_PARALLEL;
 		printf_debug("Enabling support for %s flash.\n", "parallel");
 	}
-	if (strstr(dummytype, "lpc")) {
+	if (strstr(programmer_param, "lpc")) {
 		buses_supported |= CHIP_BUSTYPE_LPC;
 		printf_debug("Enabling support for %s flash.\n", "LPC");
 	}
-	if (strstr(dummytype, "fwh")) {
+	if (strstr(programmer_param, "fwh")) {
 		buses_supported |= CHIP_BUSTYPE_FWH;
 		printf_debug("Enabling support for %s flash.\n", "FWH");
 	}
-	if (strstr(dummytype, "spi")) {
+	if (strstr(programmer_param, "spi")) {
 		buses_supported |= CHIP_BUSTYPE_SPI;
 		spi_controller = SPI_CONTROLLER_DUMMY;
 		printf_debug("Enabling support for %s flash.\n", "SPI");
 	}
 	if (buses_supported == CHIP_BUSTYPE_NONE)
 		printf_debug("Support for all flash bus types disabled.\n");
-	free(dummytype);
+	free(programmer_param);
 	return 0;
 }
 
diff --git a/flash.h b/flash.h
index abe52c5..d9b3b7d 100644
--- a/flash.h
+++ b/flash.h
@@ -277,7 +277,7 @@
 	const char *device_name;
 };
 uint32_t pcidev_validate(struct pci_dev *dev, struct pcidev_status *devs);
-uint32_t pcidev_init(uint16_t vendor_id, struct pcidev_status *devs);
+uint32_t pcidev_init(uint16_t vendor_id, struct pcidev_status *devs, char *pcidev_bdf);
 
 /* print.c */
 char *flashbuses_to_text(enum chipbustype bustype);
@@ -350,7 +350,6 @@
 #endif
 
 /* dummyflasher.c */
-extern char *dummytype;
 int dummy_init(void);
 int dummy_shutdown(void);
 void *dummy_map(const char *descr, unsigned long phys_addr, size_t len);
@@ -383,13 +382,13 @@
 /* ft2232_spi.c */
 #define FTDI_FT2232H 0x6010
 #define FTDI_FT4232H 0x6011
-extern char *ft2232spi_param;
 int ft2232_spi_init(void);
 int ft2232_spi_send_command(unsigned int writecnt, unsigned int readcnt, const unsigned char *writearr, unsigned char *readarr);
 int ft2232_spi_read(struct flashchip *flash, uint8_t *buf, int start, int len);
 int ft2232_spi_write_256(struct flashchip *flash, uint8_t *buf);
 
 /* flashrom.c */
+extern char *programmer_param;
 extern int verbose;
 extern const char *flashrom_version;
 #define printf_debug(x...) { if (verbose) printf(x); }
@@ -399,7 +398,6 @@
 int max(int a, int b);
 int check_erased_range(struct flashchip *flash, int start, int len);
 int verify_range(struct flashchip *flash, uint8_t *cmpbuf, int start, int len, char *message);
-extern char *pcidev_bdf;
 char *strcat_realloc(char *dest, const char *src);
 
 #define OK 0
@@ -507,7 +505,6 @@
 int ich_spi_send_multicommand(struct spi_command *spicommands);
 
 /* it87spi.c */
-extern char *it87opts;
 extern uint16_t it8716f_flashport;
 void enter_conf_mode_ite(uint16_t port);
 void exit_conf_mode_ite(uint16_t port);
@@ -628,7 +625,6 @@
 int write_stm50flw0x0x(struct flashchip *flash, uint8_t *buf);
 
 /* serprog.c */
-extern char *serprog_param;
 int serprog_init(void);
 int serprog_shutdown(void);
 void serprog_chip_writeb(uint8_t val, chipaddr addr);
diff --git a/flashrom.c b/flashrom.c
index a1d0cc2..a51fd63 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -34,6 +34,7 @@
 char *chip_to_probe = NULL;
 int verbose = 0;
 enum programmer programmer = PROGRAMMER_INTERNAL;
+char *programmer_param = NULL;
 
 const struct programmer_entry programmer_table[] = {
 	{
@@ -642,30 +643,32 @@
 		case 'p':
 			if (strncmp(optarg, "internal", 8) == 0) {
 				programmer = PROGRAMMER_INTERNAL;
+				if (optarg[8] == '=')
+					programmer_param = strdup(optarg + 9);
 			} else if (strncmp(optarg, "dummy", 5) == 0) {
 				programmer = PROGRAMMER_DUMMY;
 				if (optarg[5] == '=')
-					dummytype = strdup(optarg + 6);
+					programmer_param = strdup(optarg + 6);
 			} else if (strncmp(optarg, "nic3com", 7) == 0) {
 				programmer = PROGRAMMER_NIC3COM;
 				if (optarg[7] == '=')
-					pcidev_bdf = strdup(optarg + 8);
+					programmer_param = strdup(optarg + 8);
 			} else if (strncmp(optarg, "satasii", 7) == 0) {
 				programmer = PROGRAMMER_SATASII;
 				if (optarg[7] == '=')
-					pcidev_bdf = strdup(optarg + 8);
+					programmer_param = strdup(optarg + 8);
 			} else if (strncmp(optarg, "it87spi", 7) == 0) {
 				programmer = PROGRAMMER_IT87SPI;
 				if (optarg[7] == '=')
-					it87opts = strdup(optarg + 8);
+					programmer_param = strdup(optarg + 8);
 			} else if (strncmp(optarg, "ft2232spi", 9) == 0) {
 				programmer = PROGRAMMER_FT2232SPI;
 				if (optarg[9] == '=')
-					ft2232spi_param = strdup(optarg + 10);
+					programmer_param = strdup(optarg + 10);
 			} else if (strncmp(optarg, "serprog", 7) == 0) {
 				programmer = PROGRAMMER_SERPROG;
 				if (optarg[7] == '=')
-					serprog_param = strdup(optarg + 8);
+					programmer_param = strdup(optarg + 8);
 			} else {
 				printf("Error: Unknown programmer.\n");
 				exit(1);
diff --git a/ft2232_spi.c b/ft2232_spi.c
index 955bc56..db4db17 100644
--- a/ft2232_spi.c
+++ b/ft2232_spi.c
@@ -26,8 +26,6 @@
 #include "flash.h"
 #include "spi.h"
 
-char *ft2232spi_param = NULL;
-
 #if FT2232_SPI_SUPPORT == 1
 
 #include <ftdi.h>
@@ -83,16 +81,16 @@
 		return EXIT_FAILURE;
 	}
 
-	if (ft2232spi_param && !strlen(ft2232spi_param)) {
-		free(ft2232spi_param);
-		ft2232spi_param = NULL;
+	if (programmer_param && !strlen(programmer_param)) {
+		free(programmer_param);
+		programmer_param = NULL;
 	}
-	if (ft2232spi_param) {
-		if (strstr(ft2232spi_param, "2232"))
+	if (programmer_param) {
+		if (strstr(programmer_param, "2232"))
 			ft2232_type = FTDI_FT2232H;
-		if (strstr(ft2232spi_param, "4232"))
+		if (strstr(programmer_param, "4232"))
 			ft2232_type = FTDI_FT4232H;
-		portpos = strstr(ft2232spi_param, "port=");
+		portpos = strstr(programmer_param, "port=");
 		if (portpos) {
 			portpos += 5;
 			switch (toupper(*portpos)) {
@@ -107,7 +105,7 @@
 					"using default.\n");
 			}
 		}
-		free(ft2232spi_param);
+		free(programmer_param);
 	}
 	printf_debug("Using device type %s ",
 		     (ft2232_type == FTDI_FT2232H) ? "2232H" : "4232H");
diff --git a/it87spi.c b/it87spi.c
index f3b9227..299725c 100644
--- a/it87spi.c
+++ b/it87spi.c
@@ -31,7 +31,6 @@
 #define ITE_SUPERIO_PORT1	0x2e
 #define ITE_SUPERIO_PORT2	0x4e
 
-char *it87opts = NULL;
 uint16_t it8716f_flashport = 0;
 /* use fast 33MHz SPI (<>0) or slow 16MHz (0) */
 int fast_spi = 1;
@@ -95,11 +94,11 @@
 		flashport = sio_read(port, 0x64) << 8;
 		flashport |= sio_read(port, 0x65);
 		printf("Serial flash port 0x%04x\n", flashport);
-		if (it87opts && !strlen(it87opts)) {
-			free(it87opts);
-			it87opts = NULL;
+		if (programmer_param && !strlen(programmer_param)) {
+			free(programmer_param);
+			programmer_param = NULL;
 		}
-		if (it87opts && (portpos = strstr(it87opts, "port="))) {
+		if (programmer_param && (portpos = strstr(programmer_param, "port="))) {
 			portpos += 5;
 			flashport = strtol(portpos, (char **)NULL, 0);
 			printf("Forcing serial flash port 0x%04x\n", flashport);
diff --git a/nic3com.c b/nic3com.c
index bdf7db2..574e540 100644
--- a/nic3com.c
+++ b/nic3com.c
@@ -58,7 +58,7 @@
 {
 	get_io_perms();
 
-	io_base_addr = pcidev_init(PCI_VENDOR_ID_3COM, nics_3com);
+	io_base_addr = pcidev_init(PCI_VENDOR_ID_3COM, nics_3com, programmer_param);
 	id = pcidev_dev->device_id;
 
 	/* 3COM 3C90xB cards need a special fixup. */
@@ -94,7 +94,7 @@
 		OUTL(internal_conf, io_base_addr + INTERNAL_CONFIG);
 	}
 
-	free(pcidev_bdf);
+	free(programmer_param);
 	pci_cleanup(pacc);
 	release_io_perms();
 	return 0;
diff --git a/pcidev.c b/pcidev.c
index 1de2bf5..580ebae 100644
--- a/pcidev.c
+++ b/pcidev.c
@@ -26,7 +26,6 @@
 uint32_t io_base_addr;
 struct pci_access *pacc;
 struct pci_filter filter;
-char *pcidev_bdf = NULL;
 struct pci_dev *pcidev_dev = NULL;
 
 uint32_t pcidev_validate(struct pci_dev *dev, struct pcidev_status *devs)
@@ -58,7 +57,7 @@
 	return 0;
 }
 
-uint32_t pcidev_init(uint16_t vendor_id, struct pcidev_status *devs)
+uint32_t pcidev_init(uint16_t vendor_id, struct pcidev_status *devs, char *pcidev_bdf)
 {
 	struct pci_dev *dev;
 	char *msg = NULL;
diff --git a/satasii.c b/satasii.c
index b576749..2564436 100644
--- a/satasii.c
+++ b/satasii.c
@@ -47,7 +47,7 @@
 
 	get_io_perms();
 
-	pcidev_init(PCI_VENDOR_ID_SII, satas_sii);
+	pcidev_init(PCI_VENDOR_ID_SII, satas_sii, programmer_param);
 	id = pcidev_dev->device_id;
 
 	if ((id == 0x3132) || (id == 0x3124)) {
@@ -71,7 +71,7 @@
 
 int satasii_shutdown(void)
 {
-	free(pcidev_bdf);
+	free(programmer_param);
 	pci_cleanup(pacc);
 	release_io_perms();
 	return 0;
diff --git a/serprog.c b/serprog.c
index 04e15a8..d76cbe5 100644
--- a/serprog.c
+++ b/serprog.c
@@ -19,8 +19,14 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
-#include <string.h>
+#include <stdio.h>
 #include <stdlib.h>
+#include <unistd.h>
+#include "flash.h"
+
+#if SERPROG_SUPPORT == 1
+
+#include <string.h>
 #include <ctype.h>
 #include <fcntl.h>
 #include <sys/types.h>
@@ -31,15 +37,8 @@
 #include <netdb.h>
 #include <sys/stat.h>
 #include <errno.h>
-#include <stdio.h>
-#include <unistd.h>
 #include <inttypes.h>
 #include <termios.h>
-#include "flash.h"
-
-char *serprog_param = NULL;
-
-#if SERPROG_SUPPORT == 1
 
 #define MSGHEADER "serprog:"
 
@@ -431,15 +430,15 @@
 	char *dev;
 	printf_debug("%s\n", __func__);
 	/* the parameter is either of format "/dev/device:baud" or "ip:port" */
-	if ((!serprog_param) || (!strlen(serprog_param))) {
+	if ((!programmer_param) || (!strlen(programmer_param))) {
 		nodevice:
 		fprintf(stderr,
 			"Error: No device/host given for the serial programmer driver.\n"
 			"Use flashrom -p serprog=/dev/device:baud or flashrom -p serprog=ip:port\n");
 		exit(1);
 	}
-	num = strstr(serprog_param, ":");
-	len = num - serprog_param;
+	num = strstr(programmer_param, ":");
+	len = num - programmer_param;
 	if (!len) goto nodevice;
 	if (!num) {
 		fprintf(stderr,
@@ -447,15 +446,15 @@
 			"Use flashrom -p serprog=/dev/device:baud or flashrom -p serprog=ip:port\n");
 		exit(1);
 	}
-	len = num - serprog_param;
+	len = num - programmer_param;
 	dev = malloc(len + 1);
 	if (!dev) sp_die("Error: memory allocation failure");
-	memcpy(dev, serprog_param, len);
+	memcpy(dev, programmer_param, len);
 	dev[len] = 0;
 	num = strdup(num + 1);
 	if (!num) sp_die("Error: memory allocation failure");
-	free(serprog_param);
-	serprog_param = NULL;
+	free(programmer_param);
+	programmer_param = NULL;
 
 	if (dev[0] == '/') sp_fd = sp_openserport(dev, atoi(num));
 	else sp_fd = sp_opensocket(dev, atoi(num));
