aboutsummaryrefslogtreecommitdiff
path: root/hw/nseries.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/nseries.c
parent6fd8e79af031d8cfc0eb02d40d03281917fcb27b (diff)
downloadqemu-1356b98d3e95a85071e6bf9a99e8799e1ae1bbee.zip
qemu-1356b98d3e95a85071e6bf9a99e8799e1ae1bbee.tar.gz
qemu-1356b98d3e95a85071e6bf9a99e8799e1ae1bbee.tar.bz2
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/nseries.c')
-rw-r--r--hw/nseries.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/nseries.c b/hw/nseries.c
index 6b717cf..99d353a 100644
--- a/hw/nseries.c
+++ b/hw/nseries.c
@@ -178,10 +178,10 @@ static void n8x0_nand_setup(struct n800_s *s)
qdev_prop_set_drive_nofail(s->nand, "drive", dinfo->bdrv);
}
qdev_init_nofail(s->nand);
- sysbus_connect_irq(sysbus_from_qdev(s->nand), 0,
+ sysbus_connect_irq(SYS_BUS_DEVICE(s->nand), 0,
qdev_get_gpio_in(s->mpu->gpio, N8X0_ONENAND_GPIO));
omap_gpmc_attach(s->mpu->gpmc, N8X0_ONENAND_CS,
- sysbus_mmio_get_region(sysbus_from_qdev(s->nand), 0));
+ sysbus_mmio_get_region(SYS_BUS_DEVICE(s->nand), 0));
otp_region = onenand_raw_otp(s->nand);
memcpy(otp_region + 0x000, n8x0_cal_wlan_mac, sizeof(n8x0_cal_wlan_mac));
@@ -783,7 +783,7 @@ static void n8x0_usb_setup(struct n800_s *s)
{
SysBusDevice *dev;
s->usb = qdev_create(NULL, "tusb6010");
- dev = sysbus_from_qdev(s->usb);
+ dev = SYS_BUS_DEVICE(s->usb);
qdev_init_nofail(s->usb);
sysbus_connect_irq(dev, 0,
qdev_get_gpio_in(s->mpu->gpio, N8X0_TUSB_INT_GPIO));