diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/char/serial.h | 2 | ||||
-rw-r--r-- | include/hw/i386/pc.h | 17 | ||||
-rw-r--r-- | include/hw/sparc/grlib.h | 12 | ||||
-rw-r--r-- | include/qom/object.h | 2 |
4 files changed, 6 insertions, 27 deletions
diff --git a/include/hw/char/serial.h b/include/hw/char/serial.h index f431764bf5..15beb6b45c 100644 --- a/include/hw/char/serial.h +++ b/include/hw/char/serial.h @@ -92,6 +92,6 @@ SerialState *serial_mm_init(MemoryRegion *address_space, /* serial-isa.c */ #define TYPE_ISA_SERIAL "isa-serial" -bool serial_isa_init(ISABus *bus, int index, CharDriverState *chr); +void serial_hds_isa_init(ISABus *bus, int n); #endif diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index dddd255389..08ab67d7fd 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -107,23 +107,8 @@ struct PcGuestInfo { }; /* parallel.c */ -static inline bool parallel_init(ISABus *bus, int index, CharDriverState *chr) -{ - DeviceState *dev; - ISADevice *isadev; - isadev = isa_try_create(bus, "isa-parallel"); - if (!isadev) { - return false; - } - dev = DEVICE(isadev); - qdev_prop_set_uint32(dev, "index", index); - qdev_prop_set_chr(dev, "chardev", chr); - if (qdev_init(dev) < 0) { - return false; - } - return true; -} +void parallel_hds_isa_init(ISABus *bus, int n); bool parallel_mm_init(MemoryRegion *address_space, hwaddr base, int it_shift, qemu_irq irq, diff --git a/include/hw/sparc/grlib.h b/include/hw/sparc/grlib.h index 470ce72250..9a0db7b47b 100644 --- a/include/hw/sparc/grlib.h +++ b/include/hw/sparc/grlib.h @@ -55,9 +55,7 @@ DeviceState *grlib_irqmp_create(hwaddr base, qdev_prop_set_ptr(dev, "set_pil_in", set_pil_in); qdev_prop_set_ptr(dev, "set_pil_in_opaque", env); - if (qdev_init(dev)) { - return NULL; - } + qdev_init_nofail(dev); env->irq_manager = dev; @@ -87,9 +85,7 @@ DeviceState *grlib_gptimer_create(hwaddr base, qdev_prop_set_uint32(dev, "frequency", freq); qdev_prop_set_uint32(dev, "irq-line", base_irq); - if (qdev_init(dev)) { - return NULL; - } + qdev_init_nofail(dev); sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base); @@ -112,9 +108,7 @@ DeviceState *grlib_apbuart_create(hwaddr base, dev = qdev_create(NULL, "grlib,apbuart"); qdev_prop_set_chr(dev, "chrdev", serial); - if (qdev_init(dev)) { - return NULL; - } + qdev_init_nofail(dev); sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base); diff --git a/include/qom/object.h b/include/qom/object.h index 89c3092967..87575735fe 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -273,7 +273,7 @@ typedef struct InterfaceInfo InterfaceInfo; * .name = TYPE_DERIVED, * .parent = TYPE_MY, * .class_size = sizeof(DerivedClass), - * .class_init = my_class_init, + * .class_init = derived_class_init, * }; * </programlisting> * </example> |