[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/21] hw/isa: Inline isa_try_new()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 08/21] hw/isa: Inline isa_try_new() |
Date: |
Fri, 16 Feb 2024 12:02:59 +0100 |
Inline the 2 single uses of isa_try_new().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/isa/isa.h | 1 -
include/hw/net/ne2000-isa.h | 2 +-
hw/i386/pc.c | 2 +-
hw/isa/isa-bus.c | 5 -----
4 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h
index 40d6224a4e..8475120849 100644
--- a/include/hw/isa/isa.h
+++ b/include/hw/isa/isa.h
@@ -81,7 +81,6 @@ IsaDma *isa_bus_get_dma(ISABus *bus, int nchan);
*/
qemu_irq isa_bus_get_irq(ISABus *bus, unsigned irqnum);
ISADevice *isa_new(const char *name);
-ISADevice *isa_try_new(const char *name);
bool isa_realize_and_unref(ISADevice *dev, ISABus *bus, Error **errp);
ISADevice *isa_create_simple(ISABus *bus, const char *name);
diff --git a/include/hw/net/ne2000-isa.h b/include/hw/net/ne2000-isa.h
index 73bae10ad1..2440ac8621 100644
--- a/include/hw/net/ne2000-isa.h
+++ b/include/hw/net/ne2000-isa.h
@@ -22,7 +22,7 @@ static inline ISADevice *isa_ne2000_init(ISABus *bus, int
base, int irq,
{
ISADevice *d;
- d = isa_try_new(TYPE_ISA_NE2000);
+ d = ISA_DEVICE(qdev_try_new(TYPE_ISA_NE2000));
if (d) {
DeviceState *dev = DEVICE(d);
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 3c00a87317..e8130774ad 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1183,7 +1183,7 @@ static void pc_superio_init(ISABus *isa_bus, bool
create_fdctrl,
i8042 = isa_create_simple(isa_bus, TYPE_I8042);
if (!no_vmport) {
isa_create_simple(isa_bus, TYPE_VMPORT);
- vmmouse = isa_try_new("vmmouse");
+ vmmouse = ISA_DEVICE(qdev_try_new("vmmouse"));
} else {
vmmouse = NULL;
}
diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c
index f1e0f14007..8aaf44a3ef 100644
--- a/hw/isa/isa-bus.c
+++ b/hw/isa/isa-bus.c
@@ -158,11 +158,6 @@ ISADevice *isa_new(const char *name)
return ISA_DEVICE(qdev_new(name));
}
-ISADevice *isa_try_new(const char *name)
-{
- return ISA_DEVICE(qdev_try_new(name));
-}
-
ISADevice *isa_create_simple(ISABus *bus, const char *name)
{
ISADevice *dev;
--
2.41.0
- [PATCH 03/21] hw/ppc/spapr_cpu: Use qdev_is_realized() instead of QOM API, (continued)
- [PATCH 03/21] hw/ppc/spapr_cpu: Use qdev_is_realized() instead of QOM API, Philippe Mathieu-Daudé, 2024/02/16
- [PATCH 04/21] hw/tricore/testboard: Use qdev_new() instead of QOM basic API, Philippe Mathieu-Daudé, 2024/02/16
- [PATCH 05/21] hw/ppc/pnv_bmc: Use qdev_new() instead of QOM API, Philippe Mathieu-Daudé, 2024/02/16
- [PATCH 06/21] hw: Replace DEVICE(object_new) -> qdev_new(), Philippe Mathieu-Daudé, 2024/02/16
- [PATCH 07/21] target: Replace DEVICE(object_new) -> qdev_new(), Philippe Mathieu-Daudé, 2024/02/16
- [PATCH 08/21] hw/isa: Inline isa_try_new(),
Philippe Mathieu-Daudé <=
- [PATCH 09/21] hw/usb: Inline usb_try_new(), Philippe Mathieu-Daudé, 2024/02/16
- [PATCH 10/21] hw/usb: Inline usb_new(), Philippe Mathieu-Daudé, 2024/02/16
- [PATCH 11/21] hw/usb: Add QOM parentship relation with hub devices, Philippe Mathieu-Daudé, 2024/02/16
- [PATCH 12/21] hw/pci-host/q35: Update q35_host_props[] comment, Philippe Mathieu-Daudé, 2024/02/16
- [PATCH 13/21] hw/pci-host/raven: Embedded OrIRQ in PRePPCIState, Philippe Mathieu-Daudé, 2024/02/16
- [PATCH 14/21] hw/pci-host/raven: Prefer object_initialize_child over object_initialize, Philippe Mathieu-Daudé, 2024/02/16
- [PATCH 16/21] hw/net/can/versal: Prefer object_initialize_child over object_initialize, Philippe Mathieu-Daudé, 2024/02/16