hw/acpi: generic_event_device: Don't call qdev_get_machine in initfn
Calling qdev_get_machine() in the acpi_ged_initfn function would result in the following assert ../hw/core/qdev.c:858: qdev_get_machine: Assertion `dev' failed. when trying to run ./qemu-system-aarch64 -S -display none -M virt -device acpi-ged,help as the machine wasn't created yet. We call qdev_get_machine() to obtain the ram slots of the machine. So instead of initialising the GED in the init let's instead do it in the realise where the machine will exist. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Tested-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20260312043158.4191378-8-alistair.francis@wdc.com> [thuth: Replaced soc_init with acpi_ged_initfn in the patch description] Signed-off-by: Thomas Huth <thuth@redhat.com>