Thomas Heijligen has uploaded this change for review.

View Change

NEED_PCI: remove macro

The NEED_PCI macro is meanwhile only used to guard prototypes. This is
not needed.

Change-Id: I6895b795bc96b3e251700bff4b0054407aac789a
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
---
M Makefile
M meson.build
M programmer.h
3 files changed, 1 insertion(+), 6 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/34/62834/1
diff --git a/Makefile b/Makefile
index fc7c403..def0322 100644
--- a/Makefile
+++ b/Makefile
@@ -836,7 +836,6 @@
USE_LIBPCI := $(if $(call filter_deps,$(DEPENDS_ON_LIBPCI)),yes,no)
ifeq ($(USE_LIBPCI), yes)
PROGRAMMER_OBJS += pcidev.o
-FEATURE_FLAGS += -D'NEED_PCI=1'
override CFLAGS += $(CONFIG_LIBPCI_CFLAGS)
override LDFLAGS += $(CONFIG_LIBPCI_LDFLAGS)
endif
diff --git a/meson.build b/meson.build
index b7fc25f..446a8b6 100644
--- a/meson.build
+++ b/meson.build
@@ -155,7 +155,6 @@
if get_option('pciutils')
srcs += 'pcidev.c'
deps += dependency('libpci')
- cargs += '-DNEED_PCI=1'
elif need_libpci
error('pciutils is disabled but one or more enabled programmer requires PCI access')
endif
diff --git a/programmer.h b/programmer.h
index 6a0c3fa..97a5c19 100644
--- a/programmer.h
+++ b/programmer.h
@@ -115,7 +115,6 @@
unsigned int half_period;
};

-#if NEED_PCI == 1
struct pci_dev;
struct pci_filter;

@@ -139,7 +138,7 @@
int rpci_write_byte(struct pci_dev *dev, int reg, uint8_t data);
int rpci_write_word(struct pci_dev *dev, int reg, uint16_t data);
int rpci_write_long(struct pci_dev *dev, int reg, uint32_t data);
-#endif
+

#if CONFIG_INTERNAL == 1
struct penable {
@@ -260,11 +259,9 @@
#define SUPERIO_VENDOR_ITE 0x1
#define SUPERIO_VENDOR_WINBOND 0x2
#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;
extern int laptop_ok;

To view, visit change 62834. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I6895b795bc96b3e251700bff4b0054407aac789a
Gerrit-Change-Number: 62834
Gerrit-PatchSet: 1
Gerrit-Owner: Thomas Heijligen <src@posteo.de>
Gerrit-MessageType: newchange