Patchwork [1/2] PCI: define max devices number on PCIBus as PCIBus_MAX_DEVICES in pci.h

login
register
mail settings
Submitter Ken CC
Date Aug. 23, 2010, 5:46 a.m.
Message ID <20100823053342.2537.19008.stgit@k1>
Download mbox | patch
Permalink /patch/62446/
State New
Headers show

Comments

Ken CC - Aug. 23, 2010, 5:46 a.m.
Signed-off-by: Ken CC <ken.ccao@gmail.com>
---
 hw/pci.c |    2 +-
 hw/pci.h |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

Patch

diff --git a/hw/pci.c b/hw/pci.c
index a98d6f3..a09fbac 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -44,7 +44,7 @@  struct PCIBus {
     pci_hotplug_fn hotplug;
     DeviceState *hotplug_qdev;
     void *irq_opaque;
-    PCIDevice *devices[256];
+    PCIDevice *devices[PCIBUS_MAX_DEVICES];
     PCIDevice *parent_dev;
     target_phys_addr_t mem_base;
 
diff --git a/hw/pci.h b/hw/pci.h
index 1eab7e7..5f6c85b 100644
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -92,6 +92,7 @@  typedef struct PCIIORegion {
 
 #define PCI_ROM_SLOT 6
 #define PCI_NUM_REGIONS 7
+#define PCIBUS_MAX_DEVICES 256
 
 #include "pci_regs.h"