From e369cad7cd574d6d7e680ccd4d3227de7d1a0135 Mon Sep 17 00:00:00 2001 From: Isaku Yamahata Date: Fri, 30 Oct 2009 21:20:56 +0900 Subject: pci: introduce constant PCI_NUM_PINS for the number of interrupt pins, 4. introduce constant PCI_NUM_PINS for the number of interrupt pins, 4. and use it. Signed-off-by: Isaku Yamahata Acked-by: Michael S. Tsirkin Signed-off-by: Anthony Liguori --- hw/pci.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'hw/pci.h') diff --git a/hw/pci.h b/hw/pci.h index 93f93fb875..476ff594da 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -158,6 +158,8 @@ typedef struct PCIIORegion { /* Size of the standard PCI config space */ #define PCI_CONFIG_SPACE_SIZE 0x100 +#define PCI_NUM_PINS 4 /* A-D */ + /* Bits in cap_present field. */ enum { QEMU_PCI_CAP_MSIX = 0x1, @@ -192,7 +194,7 @@ struct PCIDevice { qemu_irq *irq; /* Current IRQ levels. Used internally by the generic PCI code. */ - int irq_state[4]; + int irq_state[PCI_NUM_PINS]; /* Capability bits */ uint32_t cap_present; -- cgit 1.4.1