diff mbox series

[08/21] hw/isa: Inline isa_try_new()

Message ID 20240216110313.17039-9-philmd@linaro.org
State New
Headers show
Series hw: More QDev cleanups | expand

Commit Message

Philippe Mathieu-Daudé Feb. 16, 2024, 11:02 a.m. UTC
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 mbox series

Patch

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;