pci_bridge: rename PCIBridge::bus -> PCIBridge::sec_bus.
To avoid confusion of primary bus with secondary bus, rename PCIBridge::bus to PCIBridge::sec_bus. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
		
							parent
							
								
									783753fd53
								
							
						
					
					
						commit
						7e98e3af4e
					
				@ -138,8 +138,7 @@ static void pci_bridge_write_config(PCIDevice *d,
 | 
				
			|||||||
           io base/limit upper 16 */
 | 
					           io base/limit upper 16 */
 | 
				
			||||||
        ranges_overlap(address, len, PCI_MEMORY_BASE, 20)) {
 | 
					        ranges_overlap(address, len, PCI_MEMORY_BASE, 20)) {
 | 
				
			||||||
        PCIBridge *s = container_of(d, PCIBridge, dev);
 | 
					        PCIBridge *s = container_of(d, PCIBridge, dev);
 | 
				
			||||||
        PCIBus *secondary_bus = &s->bus;
 | 
					        pci_bridge_update_mappings(&s->sec_bus);
 | 
				
			||||||
        pci_bridge_update_mappings(secondary_bus);
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -164,8 +163,7 @@ static int pci_bridge_initfn(PCIDevice *dev)
 | 
				
			|||||||
static int pci_bridge_exitfn(PCIDevice *pci_dev)
 | 
					static int pci_bridge_exitfn(PCIDevice *pci_dev)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    PCIBridge *s = DO_UPCAST(PCIBridge, dev, pci_dev);
 | 
					    PCIBridge *s = DO_UPCAST(PCIBridge, dev, pci_dev);
 | 
				
			||||||
    PCIBus *bus = &s->bus;
 | 
					    pci_unregister_secondary_bus(&s->sec_bus);
 | 
				
			||||||
    pci_unregister_secondary_bus(bus);
 | 
					 | 
				
			||||||
    return 0;
 | 
					    return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -182,8 +180,8 @@ PCIBus *pci_bridge_init(PCIBus *bus, int devfn, bool multifunction,
 | 
				
			|||||||
    qdev_init_nofail(&dev->qdev);
 | 
					    qdev_init_nofail(&dev->qdev);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    s = DO_UPCAST(PCIBridge, dev, dev);
 | 
					    s = DO_UPCAST(PCIBridge, dev, dev);
 | 
				
			||||||
    pci_register_secondary_bus(bus, &s->bus, &s->dev, map_irq, name);
 | 
					    pci_register_secondary_bus(bus, &s->sec_bus, &s->dev, map_irq, name);
 | 
				
			||||||
    return &s->bus;
 | 
					    return &s->sec_bus;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static PCIDeviceInfo bridge_info = {
 | 
					static PCIDeviceInfo bridge_info = {
 | 
				
			||||||
 | 
				
			|||||||
@ -32,7 +32,7 @@ struct PCIBus {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
typedef struct {
 | 
					typedef struct {
 | 
				
			||||||
    PCIDevice dev;
 | 
					    PCIDevice dev;
 | 
				
			||||||
    PCIBus bus;
 | 
					    PCIBus sec_bus;
 | 
				
			||||||
    uint32_t vid;
 | 
					    uint32_t vid;
 | 
				
			||||||
    uint32_t did;
 | 
					    uint32_t did;
 | 
				
			||||||
} PCIBridge;
 | 
					} PCIBridge;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user