Revision 377a7f06 hw/ne2000.c
b/hw/ne2000.c | ||
---|---|---|
779 | 779 |
static void ne2000_map(PCIDevice *pci_dev, int region_num, |
780 | 780 |
uint32_t addr, uint32_t size, int type) |
781 | 781 |
{ |
782 |
PCINE2000State *d = (PCINE2000State *)pci_dev;
|
|
782 |
PCINE2000State *d = DO_UPCAST(PCINE2000State, dev, pci_dev);
|
|
783 | 783 |
NE2000State *s = &d->ne2000; |
784 | 784 |
|
785 | 785 |
register_ioport_write(addr, 16, 1, ne2000_ioport_write, s); |
... | ... | |
805 | 805 |
|
806 | 806 |
static int pci_ne2000_init(PCIDevice *pci_dev) |
807 | 807 |
{ |
808 |
PCINE2000State *d = (PCINE2000State *)pci_dev;
|
|
808 |
PCINE2000State *d = DO_UPCAST(PCINE2000State, dev, pci_dev);
|
|
809 | 809 |
NE2000State *s; |
810 | 810 |
uint8_t *pci_conf; |
811 | 811 |
|
Also available in: Unified diff