Revision b90c73cf

b/hw/cirrus_vga.c
3204 3204
     /* memory #0 LFB */
3205 3205
     /* memory #1 memory-mapped I/O */
3206 3206
     /* XXX: s->vga.vram_size must be a power of two */
3207
     pci_register_bar((PCIDevice *)d, 0, 0x2000000,
3207
     pci_register_bar(&d->dev, 0, 0x2000000,
3208 3208
                      PCI_BASE_ADDRESS_MEM_PREFETCH, cirrus_pci_lfb_map);
3209 3209
     if (device_id == CIRRUS_ID_CLGD5446) {
3210
         pci_register_bar((PCIDevice *)d, 1, CIRRUS_PNPMMIO_SIZE,
3210
         pci_register_bar(&d->dev, 1, CIRRUS_PNPMMIO_SIZE,
3211 3211
                          PCI_BASE_ADDRESS_SPACE_MEMORY, cirrus_pci_mmio_map);
3212 3212
     }
3213 3213
     return 0;
b/hw/e1000.c
1130 1130
    d->mmio_index = cpu_register_io_memory(e1000_mmio_read,
1131 1131
            e1000_mmio_write, d);
1132 1132

  
1133
    pci_register_bar((PCIDevice *)d, 0, PNPMMIO_SIZE,
1133
    pci_register_bar(&d->dev, 0, PNPMMIO_SIZE,
1134 1134
                           PCI_BASE_ADDRESS_SPACE_MEMORY, e1000_mmio_map);
1135 1135

  
1136
    pci_register_bar((PCIDevice *)d, 1, IOPORT_SIZE,
1136
    pci_register_bar(&d->dev, 1, IOPORT_SIZE,
1137 1137
                           PCI_BASE_ADDRESS_SPACE_IO, ioport_map);
1138 1138

  
1139 1139
    memmove(d->eeprom_data, e1000_eeprom_template,
b/hw/ide/via.c
153 153
    pci_set_long(pci_conf + PCI_CAPABILITY_LIST, 0x000000c0);
154 154

  
155 155
    qemu_register_reset(via_reset, d);
156
    pci_register_bar((PCIDevice *)d, 4, 0x10,
156
    pci_register_bar(&d->dev, 4, 0x10,
157 157
                           PCI_BASE_ADDRESS_SPACE_IO, bmdma_map);
158 158

  
159 159
    vmstate_register(&dev->qdev, 0, &vmstate_ide_pci, d);
b/hw/lsi53c895a.c
2177 2177
    s->ram_io_addr = cpu_register_io_memory(lsi_ram_readfn,
2178 2178
                                            lsi_ram_writefn, s);
2179 2179

  
2180
    /* TODO: use dev and get rid of cast below */
2181
    pci_register_bar((struct PCIDevice *)s, 0, 256,
2180
    pci_register_bar(&s->dev, 0, 256,
2182 2181
                           PCI_BASE_ADDRESS_SPACE_IO, lsi_io_mapfunc);
2183
    pci_register_bar((struct PCIDevice *)s, 1, 0x400,
2182
    pci_register_bar(&s->dev, 1, 0x400,
2184 2183
                           PCI_BASE_ADDRESS_SPACE_MEMORY, lsi_mmio_mapfunc);
2185
    pci_register_bar((struct PCIDevice *)s, 2, 0x2000,
2184
    pci_register_bar(&s->dev, 2, 0x2000,
2186 2185
                           PCI_BASE_ADDRESS_SPACE_MEMORY, lsi_ram_mapfunc);
2187 2186
    QTAILQ_INIT(&s->queue);
2188 2187

  
b/hw/openpic.c
1197 1197
        pci_conf[0x3d] = 0x00; // no interrupt pin
1198 1198

  
1199 1199
        /* Register I/O spaces */
1200
        pci_register_bar((PCIDevice *)opp, 0, 0x40000,
1200
        pci_register_bar(&opp->pci_dev, 0, 0x40000,
1201 1201
                               PCI_BASE_ADDRESS_SPACE_MEMORY, &openpic_map);
1202 1202
    } else {
1203 1203
        opp = qemu_mallocz(sizeof(openpic_t));
b/hw/usb-ohci.c
1741 1741
    ohci->state.irq = ohci->pci_dev.irq[0];
1742 1742

  
1743 1743
    /* TODO: avoid cast below by using dev */
1744
    pci_register_bar((struct PCIDevice *)ohci, 0, 256,
1744
    pci_register_bar(&ohci->pci_dev, 0, 256,
1745 1745
                           PCI_BASE_ADDRESS_SPACE_MEMORY, ohci_mapfunc);
1746 1746
    return 0;
1747 1747
}

Also available in: Unified diff