[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 24/39] ssi: Convert last use of ssi_create_slave_no_init() man
From: |
Markus Armbruster |
Subject: |
[PATCH v3 24/39] ssi: Convert last use of ssi_create_slave_no_init() manually |
Date: |
Tue, 9 Jun 2020 18:39:17 +0200 |
Same transformation as in the previous commit. Manual, because
convincing Coccinelle to transform this case is not worthwhile.
Cc: Alistair Francis <alistair@alistair23.me>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/ssi/ssi.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/ssi/ssi.c b/hw/ssi/ssi.c
index 54106f5ef8..58e7d904db 100644
--- a/hw/ssi/ssi.c
+++ b/hw/ssi/ssi.c
@@ -16,6 +16,7 @@
#include "hw/ssi/ssi.h"
#include "migration/vmstate.h"
#include "qemu/module.h"
+#include "qapi/error.h"
struct SSIBus {
BusState parent_obj;
@@ -96,9 +97,9 @@ DeviceState *ssi_create_slave_no_init(SSIBus *bus, const char
*name)
DeviceState *ssi_create_slave(SSIBus *bus, const char *name)
{
- DeviceState *dev = ssi_create_slave_no_init(bus, name);
+ DeviceState *dev = qdev_new(name);
- qdev_init_nofail(dev);
+ qdev_realize_and_unref(dev, &bus->parent_obj, &error_fatal);
return dev;
}
--
2.26.2
- [PATCH v3 00/39] qdev: Rework how we plug into the parent bus, Markus Armbruster, 2020/06/09
- [PATCH v3 05/39] qdev: Put qdev_new() to use with Coccinelle, Markus Armbruster, 2020/06/09
- [PATCH v3 01/39] qdev: Rename qbus_realize() to qbus_init(), Markus Armbruster, 2020/06/09
- [PATCH v3 03/39] Revert "hw/versatile: realize the PCI root bus as part of the versatile init", Markus Armbruster, 2020/06/09
- [PATCH v3 07/39] qdev: Convert to qdev_unrealize() with Coccinelle, Markus Armbruster, 2020/06/09
- [PATCH v3 10/39] qdev: Convert uses of qdev_create() manually, Markus Armbruster, 2020/06/09
- [PATCH v3 06/39] qdev: Convert to qbus_realize(), qbus_unrealize(), Markus Armbruster, 2020/06/09
- [PATCH v3 14/39] hw/ppc: Eliminate two superfluous QOM casts, Markus Armbruster, 2020/06/09
- [PATCH v3 16/39] pci: Convert uses of pci_create() etc. manually, Markus Armbruster, 2020/06/09
- [PATCH v3 21/39] isa: isa_create(), isa_try_create() are now unused, drop, Markus Armbruster, 2020/06/09
- [PATCH v3 24/39] ssi: Convert last use of ssi_create_slave_no_init() manually,
Markus Armbruster <=
- [PATCH v3 18/39] isa: New isa_new(), isa_realize_and_unref() etc., Markus Armbruster, 2020/06/09
- [PATCH v3 30/39] qdev: qdev_create(), qdev_try_create() are now unused, drop, Markus Armbruster, 2020/06/09
- [PATCH v3 25/39] ssi: ssi_create_slave_no_init() is now unused, drop, Markus Armbruster, 2020/06/09
- [PATCH v3 19/39] isa: Convert uses of isa_create() with Coccinelle, Markus Armbruster, 2020/06/09
- [PATCH v3 15/39] pci: Convert uses of pci_create() etc. with Coccinelle, Markus Armbruster, 2020/06/09
- [PATCH v3 23/39] ssi: Convert uses of ssi_create_slave_no_init() with Coccinelle, Markus Armbruster, 2020/06/09
- [PATCH v3 08/39] qdev: Convert to qdev_unrealize() manually, Markus Armbruster, 2020/06/09
- [PATCH v3 12/39] qdev: Convert uses of qdev_set_parent_bus() manually, Markus Armbruster, 2020/06/09
- [PATCH v3 32/39] auxbus: New aux_bus_realize(), pairing with aux_bus_init(), Markus Armbruster, 2020/06/09
- [PATCH v3 37/39] macio: Convert use of qdev_set_parent_bus(), Markus Armbruster, 2020/06/09