aboutsummaryrefslogtreecommitdiff
path: root/hw/xtensa/xtfpga.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xtensa/xtfpga.c')
-rw-r--r--hw/xtensa/xtfpga.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c
index eab5c8062e..5d0834c1d9 100644
--- a/hw/xtensa/xtfpga.c
+++ b/hw/xtensa/xtfpga.c
@@ -150,9 +150,9 @@ static void xtfpga_net_init(MemoryRegion *address_space,
dev = qdev_new("open_eth");
qdev_set_nic_properties(dev, nd);
- qdev_realize_and_unref(dev, NULL, &error_fatal);
s = SYS_BUS_DEVICE(dev);
+ sysbus_realize_and_unref(s, &error_fatal);
sysbus_connect_irq(s, 0, irq);
memory_region_add_subregion(address_space, base,
sysbus_mmio_get_region(s, 0));
@@ -181,8 +181,8 @@ static PFlashCFI01 *xtfpga_flash_init(MemoryRegion *address_space,
qdev_prop_set_uint8(dev, "width", 2);
qdev_prop_set_bit(dev, "big-endian", be);
qdev_prop_set_string(dev, "name", "xtfpga.io.flash");
- qdev_realize_and_unref(dev, NULL, &error_fatal);
s = SYS_BUS_DEVICE(dev);
+ sysbus_realize_and_unref(s, &error_fatal);
memory_region_add_subregion(address_space, board->flash->base,
sysbus_mmio_get_region(s, 0));
return PFLASH_CFI01(dev);