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>
This commit is contained in:
Andreas Färber 2013-01-20 02:47:33 +01:00 committed by Anthony Liguori
parent 6fd8e79af0
commit 1356b98d3e
76 changed files with 214 additions and 215 deletions

View file

@ -210,7 +210,7 @@ void slavio_pic_info(Monitor *mon, DeviceState *dev)
SLAVIO_INTCTLState *s;
int i;
sd = sysbus_from_qdev(dev);
sd = SYS_BUS_DEVICE(dev);
s = FROM_SYSBUS(SLAVIO_INTCTLState, sd);
for (i = 0; i < MAX_CPUS; i++) {
monitor_printf(mon, "per-cpu %d: pending 0x%08x\n", i,
@ -230,7 +230,7 @@ void slavio_irq_info(Monitor *mon, DeviceState *dev)
int i;
int64_t count;
sd = sysbus_from_qdev(dev);
sd = SYS_BUS_DEVICE(dev);
s = FROM_SYSBUS(SLAVIO_INTCTLState, sd);
monitor_printf(mon, "IRQ statistics:\n");
for (i = 0; i < 32; i++) {