[PATCH] lance: unbreak after memory API conversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The conversion passed the wrong opaque pointer, causing a crash on first use.
Pass the correct opaque.

Signed-off-by: Avi Kivity <avi@xxxxxxxxxx>
---
 hw/lance.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/lance.c b/hw/lance.c
index 8e20360..d83e7f5 100644
--- a/hw/lance.c
+++ b/hw/lance.c
@@ -116,7 +116,7 @@ static int lance_init(SysBusDevice *dev)
     SysBusPCNetState *d = FROM_SYSBUS(SysBusPCNetState, dev);
     PCNetState *s = &d->state;
 
-    memory_region_init_io(&s->mmio, &lance_mem_ops, s, "lance-mmio", 4);
+    memory_region_init_io(&s->mmio, &lance_mem_ops, d, "lance-mmio", 4);
 
     qdev_init_gpio_in(&dev->qdev, parent_lance_reset, 1);
 
-- 
1.7.5.3

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux