aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2009-06-09 17:16:53 +0000
committerBlue Swirl <blauwirbel@gmail.com>2009-06-09 17:25:00 +0000
commit82384670456d040126252f2e729138e834ecb472 (patch)
tree33298c149ec30afd2671cb178139b73efe593430 /hw
parent3dcd219f09d6c1817bf9a132899e6b925f7a0914 (diff)
Remove unused and misnamed field and variable
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/pci.c6
-rw-r--r--hw/pci.h4
2 files changed, 0 insertions, 10 deletions
diff --git a/hw/pci.c b/hw/pci.c
index 0ab5b94a7d..8c904bafdb 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -54,7 +54,6 @@ static void pci_set_irq(void *opaque, int irq_num, int level);
target_phys_addr_t pci_mem_base;
static uint16_t pci_default_sub_vendor_id = PCI_SUBVENDOR_ID_REDHAT_QUMRANET;
static uint16_t pci_default_sub_device_id = PCI_SUBDEVICE_ID_QEMU;
-static int pci_irq_index;
static PCIBus *first_bus;
static void pcibus_save(QEMUFile *f, void *opaque)
@@ -245,9 +244,6 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus,
PCIConfigReadFunc *config_read,
PCIConfigWriteFunc *config_write)
{
- if (pci_irq_index >= PCI_DEVICES_MAX)
- return NULL;
-
if (devfn < 0) {
for(devfn = bus->devfn_min ; devfn < 256; devfn += 8) {
if (!bus->devices[devfn])
@@ -268,7 +264,6 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus,
config_write = pci_default_write_config;
pci_dev->config_read = config_read;
pci_dev->config_write = config_write;
- pci_dev->irq_index = pci_irq_index++;
bus->devices[devfn] = pci_dev;
pci_dev->irq = qemu_allocate_irqs(pci_set_irq, pci_dev, 4);
return pci_dev;
@@ -322,7 +317,6 @@ int pci_unregister_device(PCIDevice *pci_dev)
pci_unregister_io_regions(pci_dev);
qemu_free_irqs(pci_dev->irq);
- pci_irq_index--;
pci_dev->bus->devices[pci_dev->devfn] = NULL;
qdev_free(&pci_dev->qdev);
return 0;
diff --git a/hw/pci.h b/hw/pci.h
index 0405837f73..af6c8fd153 100644
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -92,8 +92,6 @@ typedef struct PCIIORegion {
#define PCI_ROM_SLOT 6
#define PCI_NUM_REGIONS 7
-#define PCI_DEVICES_MAX 64
-
/* Declarations from linux/pci_regs.h */
#define PCI_VENDOR_ID 0x00 /* 16 bits */
#define PCI_DEVICE_ID 0x02 /* 16 bits */
@@ -154,8 +152,6 @@ struct PCIDevice {
PCIConfigReadFunc *config_read;
PCIConfigWriteFunc *config_write;
PCIUnregisterFunc *unregister;
- /* ??? This is a PC-specific hack, and should be removed. */
- int irq_index;
/* IRQ objects for the INTA-INTD pins. */
qemu_irq *irq;