[PATCH 22/42] LIBPCI: use enum with pci_system_type

Daniel Hellstrom daniel at gaisler.com
Tue Apr 14 11:32:49 UTC 2015


---
 cpukit/libpci/pci.h     |    4 ++--
 cpukit/libpci/pci_cfg.c |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cpukit/libpci/pci.h b/cpukit/libpci/pci.h
index fc33bbb..efefcec 100644
--- a/cpukit/libpci/pci.h
+++ b/cpukit/libpci/pci.h
@@ -53,12 +53,12 @@ enum {
  *
  * The active configuration Library set this variable.
  */
-enum {
+enum pci_system_type {
 	PCI_SYSTEM_NONE = 0,
 	PCI_SYSTEM_HOST = 1,
 	PCI_SYSTEM_PERIPHERAL = 2,
 };
-extern int pci_system_type;
+extern enum pci_system_type pci_system_type;
 
 /* PCI Bus Endianness. The PCI specification is little endian, however on some
  * embedded systems (AT697-LEON2 for example) the PCI bus is defined as big
diff --git a/cpukit/libpci/pci_cfg.c b/cpukit/libpci/pci_cfg.c
index e27d845..7bab478 100644
--- a/cpukit/libpci/pci_cfg.c
+++ b/cpukit/libpci/pci_cfg.c
@@ -18,7 +18,7 @@ int pci_bus_cnt = 0;
 uint32_t pci_invalid_address = 0;
 
 /* PCI System type. Configuration Library setup this */
-int pci_system_type = PCI_SYSTEM_NONE;
+enum pci_system_type pci_system_type = PCI_SYSTEM_NONE;
 
 /* PCI Endianness.
  *
-- 
1.7.0.4




More information about the devel mailing list