aboutsummaryrefslogtreecommitdiff
path: root/hw/etraxfs_pic.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-08-03 17:35:24 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-08-10 13:05:51 -0500
commitddde095c8f12505b46b826b8bf44cf2bd62a5d9b (patch)
treedd74c7a5d37a1e07f40cb66fe1491e86af7204f0 /hw/etraxfs_pic.c
parentec02f7dec2a4baf18164c1cf7509760080e2f3d5 (diff)
qdev/prop: convert etraxfs_pic.c to helper macros.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
Diffstat (limited to 'hw/etraxfs_pic.c')
-rw-r--r--hw/etraxfs_pic.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/hw/etraxfs_pic.c b/hw/etraxfs_pic.c
index e6272189bb..4527d98dc7 100644
--- a/hw/etraxfs_pic.c
+++ b/hw/etraxfs_pic.c
@@ -39,7 +39,7 @@
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];
@@ -71,7 +71,8 @@ static void pic_update(struct etrax_pic *fs)
}
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);
}
@@ -153,12 +154,8 @@ static SysBusDeviceInfo etraxfs_pic_info = {
.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(),
}
};