Skip to contentSkip to conversation

lance: unbreak after memory API conversion

PATCH Applied Avi Kivity 2 participants 2 messages Aug 9, 2011 KVM

lore
Share & tools
lore

Avi Kivity

author
#0 lore raw

PATCH 1/1 lance: unbreak after memory API conversion

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

---
 hw/lance.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
hw/lance.c +1 -1
index 8e20360..d83e7f5 100644
@@ -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);
 
Signature · 1 line
1.7.5.3
#1 lore raw
Quoted 2 lines · Avi Kivity

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

I've applied this, thanks.

Quoted 23 lines
---
 hw/lance.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
hw/lance.c +1 -1
index 8e20360..d83e7f5 100644
@@ -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);
 
Signature · 1 line
1.7.5.3