summaryrefslogtreecommitdiffstats
path: root/hw/lan9118.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-01-20 02:47:33 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2013-01-21 13:52:24 -0600
commit1356b98d3e95a85071e6bf9a99e8799e1ae1bbee (patch)
tree26b8c982dec9507ac71f29914dfe09f0cfb9a848 /hw/lan9118.c
parent6fd8e79af031d8cfc0eb02d40d03281917fcb27b (diff)
downloadhqemu-1356b98d3e95a85071e6bf9a99e8799e1ae1bbee.zip
hqemu-1356b98d3e95a85071e6bf9a99e8799e1ae1bbee.tar.gz
sysbus: Drop sysbus_from_qdev() cast macro
Replace by SYS_BUS_DEVICE() QOM cast macro using a scripted conversion. Avoids the old macro creeping into new code. Resolve a Coding Style warning in openpic code. Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/lan9118.c')
-rw-r--r--hw/lan9118.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/lan9118.c b/hw/lan9118.c
index 969b634..6596979 100644
--- a/hw/lan9118.c
+++ b/hw/lan9118.c
@@ -401,7 +401,7 @@ static void phy_reset(lan9118_state *s)
static void lan9118_reset(DeviceState *d)
{
- lan9118_state *s = FROM_SYSBUS(lan9118_state, sysbus_from_qdev(d));
+ lan9118_state *s = FROM_SYSBUS(lan9118_state, SYS_BUS_DEVICE(d));
s->irq_cfg &= (IRQ_TYPE | IRQ_POL);
s->int_sts = 0;
s->int_en = 0;
@@ -1391,7 +1391,7 @@ void lan9118_init(NICInfo *nd, uint32_t base, qemu_irq irq)
dev = qdev_create(NULL, "lan9118");
qdev_set_nic_properties(dev, nd);
qdev_init_nofail(dev);
- s = sysbus_from_qdev(dev);
+ s = SYS_BUS_DEVICE(dev);
sysbus_mmio_map(s, 0, base);
sysbus_connect_irq(s, 0, irq);
}
OpenPOWER on IntegriCloud