acpihp: simplify acpi_pcihp_disable_root_bus
commit784802689f84b716de1fbdd2cef30e303b73b3e8
authorAni Sinha <ani@anisinha.ca>
Wed, 29 Dec 2021 07:57:53 +0000 (29 13:27 +0530)
committerMichael S. Tsirkin <mst@redhat.com>
Sat, 8 Jan 2022 00:30:13 +0000 (7 19:30 -0500)
tree7c0e20c5c667189a51ef7448c09873330d2a93bc
parentc8adb4d222c42951a9d0367e5f5d4e1f5e2c9ad7
acpihp: simplify acpi_pcihp_disable_root_bus

Get rid of the static variable that keeps track of whether hotplug has been
disabled on the root pci bus. Simply use qbus_is_hotpluggable() api to
perform the same check. This eliminates additional if conditional and
simplifies the function.

Signed-off-by: Ani Sinha <ani@anisinha.ca>
Message-Id: <1640764674-7784-1-git-send-email-ani@anirban.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/acpi/pcihp.c