[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 07/11] hw/isa: Simplify isa_get_irq()
From: |
Philippe Mathieu-Daudé |
Subject: |
[RFC PATCH 07/11] hw/isa: Simplify isa_get_irq() |
Date: |
Tue, 18 May 2021 23:55:41 +0200 |
Previous commit removed the calls to isa_get_irq() passing a NULL
ISADevice. Simplify the assertion, removing the use on the global
isabus object.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
hw/isa/isa-bus.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c
index b946e6dc478..65a26ac6c2c 100644
--- a/hw/isa/isa-bus.c
+++ b/hw/isa/isa-bus.c
@@ -89,7 +89,11 @@ qemu_irq isa_bus_get_irq(ISABus *bus, unsigned isairq)
*/
qemu_irq isa_get_irq(ISADevice *dev, unsigned isairq)
{
- assert(!dev || ISA_BUS(qdev_get_parent_bus(DEVICE(dev))) == isabus);
+ ISABus *isabus;
+
+ assert(dev);
+ isabus = isa_bus_from_device(dev);
+
return isa_bus_get_irq(isabus, isairq);
}
--
2.26.3
- [RFC PATCH 00/11] hw/isa: Remove dependencies on ISA bus singleton, Philippe Mathieu-Daudé, 2021/05/18
- [RFC PATCH 02/11] hw/ide: Add PCIIDEState::isa_bus link, Philippe Mathieu-Daudé, 2021/05/18
- [RFC PATCH 03/11] hw/ide/piix: Set the ISA-bus QOM link, Philippe Mathieu-Daudé, 2021/05/18
- [RFC PATCH 01/11] hw/isa: Explode pci_create_simple() calls, Philippe Mathieu-Daudé, 2021/05/18
- [RFC PATCH 04/11] hw/ide/via: Set the ISA-bus QOM link, Philippe Mathieu-Daudé, 2021/05/18
- [RFC PATCH 05/11] hw/isa: Extract isa_bus_get_irq() from isa_get_irq(), Philippe Mathieu-Daudé, 2021/05/18
- [RFC PATCH 06/11] hw/ide: Replace isa_get_irq() by isa_bus_get_irq(), Philippe Mathieu-Daudé, 2021/05/18
- [RFC PATCH 07/11] hw/isa: Simplify isa_get_irq(),
Philippe Mathieu-Daudé <=
- [RFC PATCH 09/11] hw/ide: Let ide_init_ioport() take an ISA bus argument instead of device, Philippe Mathieu-Daudé, 2021/05/18
- [RFC PATCH 08/11] hw/isa: Extract bus part from isa_register_portio_list(), Philippe Mathieu-Daudé, 2021/05/18
- [RFC PATCH 10/11] hw/isa: Remove use of global isa bus, Philippe Mathieu-Daudé, 2021/05/18
- [RFC PATCH 11/11] hw/isa: Rename isabus singleton as 'g_isabus', Philippe Mathieu-Daudé, 2021/05/18