[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 10/10] hw/isa/isa-bus: Resolve isabus global
From: |
Bernhard Beschow |
Subject: |
[PATCH v2 10/10] hw/isa/isa-bus: Resolve isabus global |
Date: |
Thu, 26 Jan 2023 22:17:40 +0100 |
Now that only isa_bus_new() accesses the isabus global it can be removed
assuming that all call sites take care of not passing the same address
spaces to different isa_bus_new() invocations.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
hw/isa/isa-bus.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c
index 8bae5cc473..b8c89a1e65 100644
--- a/hw/isa/isa-bus.c
+++ b/hw/isa/isa-bus.c
@@ -26,8 +26,6 @@
#include "hw/isa/isa.h"
#include "hw/acpi/acpi_aml_interface.h"
-static ISABus *isabus;
-
static char *isabus_get_fw_dev_path(DeviceState *dev);
static void isa_bus_class_init(ObjectClass *klass, void *data)
@@ -53,10 +51,8 @@ static const TypeInfo isa_bus_info = {
ISABus *isa_bus_new(DeviceState *dev, MemoryRegion* address_space,
MemoryRegion *address_space_io, Error **errp)
{
- if (isabus) {
- error_setg(errp, "Can't create a second ISA bus");
- return NULL;
- }
+ ISABus *isabus;
+
if (!dev) {
dev = qdev_new("isabus-bridge");
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
--
2.39.1
- [PATCH v2 00/10] Resolve isabus global, Bernhard Beschow, 2023/01/26
- [PATCH v2 01/10] softmmu/ioport: Move portio_list_init() in front of portio_list_add(), Bernhard Beschow, 2023/01/26
- [PATCH v2 04/10] hw/ide/piix: Disuse isa_get_irq(), Bernhard Beschow, 2023/01/26
- [PATCH v2 10/10] hw/isa/isa-bus: Resolve isabus global,
Bernhard Beschow <=
- [PATCH v2 06/10] hw/ide/pci: Add PCIIDEState::isa_irqs[], Bernhard Beschow, 2023/01/26
- [PATCH v2 02/10] softmmu/ioport: Merge portio_list_add() into portio_list_init(), Bernhard Beschow, 2023/01/26
- [PATCH v2 03/10] softmmu/ioport: Remove unused functions, Bernhard Beschow, 2023/01/26
- [PATCH v2 08/10] hw/ide: Let ide_init_ioport() take a MemoryRegion argument instead of ISADevice, Bernhard Beschow, 2023/01/26
- [PATCH v2 09/10] hw/isa: Remove use of global isa bus, Bernhard Beschow, 2023/01/26
- [PATCH v2 05/10] Revert "hw/ide: Fix crash when plugging a piix3-ide device into the x-remote machine", Bernhard Beschow, 2023/01/26
- [PATCH v2 07/10] hw/ide/piix: Require an ISABus only for user-created instances, Bernhard Beschow, 2023/01/26
- Re: [PATCH v2 00/10] Resolve isabus global, Bernhard Beschow, 2023/01/30