hw/ppc/e500: Prefer local variable over qdev_get_machine()
Signed-off-by: Bernhard Beschow <shentey@gmail.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20221216145709.271940-5-shentey@gmail.com> [danielhb: remove linebreak in object_property_add_child()] Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
712622385b
commit
1a3e6528ac
@ -984,8 +984,7 @@ void ppce500_init(MachineState *machine)
|
||||
memory_region_add_subregion(address_space_mem, 0, machine->ram);
|
||||
|
||||
dev = qdev_new("e500-ccsr");
|
||||
object_property_add_child(qdev_get_machine(), "e500-ccsr",
|
||||
OBJECT(dev));
|
||||
object_property_add_child(OBJECT(machine), "e500-ccsr", OBJECT(dev));
|
||||
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
|
||||
ccsr = CCSR(dev);
|
||||
ccsr_addr_space = &ccsr->ccsr_space;
|
||||
@ -1048,7 +1047,7 @@ void ppce500_init(MachineState *machine)
|
||||
|
||||
/* PCI */
|
||||
dev = qdev_new("e500-pcihost");
|
||||
object_property_add_child(qdev_get_machine(), "pci-host", OBJECT(dev));
|
||||
object_property_add_child(OBJECT(machine), "pci-host", OBJECT(dev));
|
||||
qdev_prop_set_uint32(dev, "first_slot", pmc->pci_first_slot);
|
||||
qdev_prop_set_uint32(dev, "first_pin_irq", pci_irq_nrs[0]);
|
||||
s = SYS_BUS_DEVICE(dev);
|
||||
|
Loading…
Reference in New Issue
Block a user