struct etrax_pic
{
SysBusDevice busdev;
- uint32_t *interrupt_vector;
+ void *interrupt_vector;
qemu_irq parent_irq;
qemu_irq parent_nmi;
uint32_t regs[R_MAX];
}
if (fs->interrupt_vector) {
- *fs->interrupt_vector = vector;
+ /* hack alert: ptr property */
+ *(uint32_t*)(fs->interrupt_vector) = vector;
}
qemu_set_irq(fs->parent_irq, !!vector);
}
.qdev.name = "etraxfs,pic",
.qdev.size = sizeof(struct etrax_pic),
.qdev.props = (Property[]) {
- {
- .name = "interrupt_vector",
- .info = &qdev_prop_ptr,
- .offset = offsetof(struct etrax_pic, interrupt_vector),
- },
- {/* end of list */}
+ DEFINE_PROP_PTR("interrupt_vector", struct etrax_pic, interrupt_vector),
+ DEFINE_PROP_END_OF_LIST(),
}
};