Commit 82384670456d040126252f2e729138e834ecb472
1 parent
3dcd219f
Remove unused and misnamed field and variable
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Showing
2 changed files
with
0 additions
and
10 deletions
hw/pci.c
... | ... | @@ -54,7 +54,6 @@ static void pci_set_irq(void *opaque, int irq_num, int level); |
54 | 54 | target_phys_addr_t pci_mem_base; |
55 | 55 | static uint16_t pci_default_sub_vendor_id = PCI_SUBVENDOR_ID_REDHAT_QUMRANET; |
56 | 56 | static uint16_t pci_default_sub_device_id = PCI_SUBDEVICE_ID_QEMU; |
57 | -static int pci_irq_index; | |
58 | 57 | static PCIBus *first_bus; |
59 | 58 | |
60 | 59 | static void pcibus_save(QEMUFile *f, void *opaque) |
... | ... | @@ -245,9 +244,6 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus, |
245 | 244 | PCIConfigReadFunc *config_read, |
246 | 245 | PCIConfigWriteFunc *config_write) |
247 | 246 | { |
248 | - if (pci_irq_index >= PCI_DEVICES_MAX) | |
249 | - return NULL; | |
250 | - | |
251 | 247 | if (devfn < 0) { |
252 | 248 | for(devfn = bus->devfn_min ; devfn < 256; devfn += 8) { |
253 | 249 | if (!bus->devices[devfn]) |
... | ... | @@ -268,7 +264,6 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus, |
268 | 264 | config_write = pci_default_write_config; |
269 | 265 | pci_dev->config_read = config_read; |
270 | 266 | pci_dev->config_write = config_write; |
271 | - pci_dev->irq_index = pci_irq_index++; | |
272 | 267 | bus->devices[devfn] = pci_dev; |
273 | 268 | pci_dev->irq = qemu_allocate_irqs(pci_set_irq, pci_dev, 4); |
274 | 269 | return pci_dev; |
... | ... | @@ -322,7 +317,6 @@ int pci_unregister_device(PCIDevice *pci_dev) |
322 | 317 | pci_unregister_io_regions(pci_dev); |
323 | 318 | |
324 | 319 | qemu_free_irqs(pci_dev->irq); |
325 | - pci_irq_index--; | |
326 | 320 | pci_dev->bus->devices[pci_dev->devfn] = NULL; |
327 | 321 | qdev_free(&pci_dev->qdev); |
328 | 322 | return 0; | ... | ... |
hw/pci.h
... | ... | @@ -92,8 +92,6 @@ typedef struct PCIIORegion { |
92 | 92 | #define PCI_ROM_SLOT 6 |
93 | 93 | #define PCI_NUM_REGIONS 7 |
94 | 94 | |
95 | -#define PCI_DEVICES_MAX 64 | |
96 | - | |
97 | 95 | /* Declarations from linux/pci_regs.h */ |
98 | 96 | #define PCI_VENDOR_ID 0x00 /* 16 bits */ |
99 | 97 | #define PCI_DEVICE_ID 0x02 /* 16 bits */ |
... | ... | @@ -154,8 +152,6 @@ struct PCIDevice { |
154 | 152 | PCIConfigReadFunc *config_read; |
155 | 153 | PCIConfigWriteFunc *config_write; |
156 | 154 | PCIUnregisterFunc *unregister; |
157 | - /* ??? This is a PC-specific hack, and should be removed. */ | |
158 | - int irq_index; | |
159 | 155 | |
160 | 156 | /* IRQ objects for the INTA-INTD pins. */ |
161 | 157 | qemu_irq *irq; | ... | ... |