diff options
author | Keqian Zhu <zhukeqian1@huawei.com> | 2020-01-23 15:22:39 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-01-23 15:22:39 +0000 |
commit | 53eccc70343727a13b010d1d5b172c8f3dd21bb7 (patch) | |
tree | 8c19ac8e909358752eb1c9d0e304f3610c09fafd /hw | |
parent | de1a8336a007041fc5350a0539f98900d469559c (diff) | |
download | qemu-53eccc70343727a13b010d1d5b172c8f3dd21bb7.zip qemu-53eccc70343727a13b010d1d5b172c8f3dd21bb7.tar.gz qemu-53eccc70343727a13b010d1d5b172c8f3dd21bb7.tar.bz2 |
hw/arm: Use helper function to trigger hotplug handler plug
We can use existing helper function to trigger hotplug handler
plug, which makes code clearer.
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
Message-id: 20200120012755.44581-3-zhukeqian1@huawei.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/arm/virt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 39ab5f4..656b008 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1934,7 +1934,6 @@ static void virt_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, static void virt_memory_plug(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp) { - HotplugHandlerClass *hhc; VirtMachineState *vms = VIRT_MACHINE(hotplug_dev); Error *local_err = NULL; @@ -1943,8 +1942,9 @@ static void virt_memory_plug(HotplugHandler *hotplug_dev, goto out; } - hhc = HOTPLUG_HANDLER_GET_CLASS(vms->acpi_dev); - hhc->plug(HOTPLUG_HANDLER(vms->acpi_dev), dev, &error_abort); + hotplug_handler_plug(HOTPLUG_HANDLER(vms->acpi_dev), + dev, &error_abort); + out: error_propagate(errp, local_err); } |