diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2013-06-25 15:04:35 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-07-04 17:42:46 +0200 |
commit | dcb117bfda5af6f6ceb7231778d36d8bce4aee93 (patch) | |
tree | a0b2941c5b06f8bbdb4412511f6f647899469453 /hw/net/ne2000.c | |
parent | 42e038fe918f4eecdd84ef9ee406bba1deb15cec (diff) |
ne2000: pass device to ne2000_setup_io, use it as owner
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/net/ne2000.c')
-rw-r--r-- | hw/net/ne2000.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/net/ne2000.c b/hw/net/ne2000.c index 00940af833..8d43fd9afe 100644 --- a/hw/net/ne2000.c +++ b/hw/net/ne2000.c @@ -699,9 +699,9 @@ static const MemoryRegionOps ne2000_ops = { /***********************************************************/ /* PCI NE2000 definitions */ -void ne2000_setup_io(NE2000State *s, unsigned size) +void ne2000_setup_io(NE2000State *s, DeviceState *dev, unsigned size) { - memory_region_init_io(&s->io, NULL, &ne2000_ops, s, "ne2000", size); + memory_region_init_io(&s->io, OBJECT(dev), &ne2000_ops, s, "ne2000", size); } static void ne2000_cleanup(NetClientState *nc) @@ -729,7 +729,7 @@ static int pci_ne2000_init(PCIDevice *pci_dev) pci_conf[PCI_INTERRUPT_PIN] = 1; /* interrupt pin A */ s = &d->ne2000; - ne2000_setup_io(s, 0x100); + ne2000_setup_io(s, DEVICE(pci_dev), 0x100); pci_register_bar(&d->dev, 0, PCI_BASE_ADDRESS_SPACE_IO, &s->io); s->irq = d->dev.irq[0]; |