aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-12-23 09:08:05 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2012-02-03 10:41:08 -0600
commit8b45d447ce5cce07cbdf0f42b969137430284d5c (patch)
tree8732080bdc35de9f5399db2244e7904ffaf647b5 /hw
parentdb85b575b9f29487d1dd854da730a9293d91198a (diff)
container: make a decendent of Object
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> --- v1 -> v2 - Add license (Paolo)
Diffstat (limited to 'hw')
-rw-r--r--hw/container.c29
-rw-r--r--hw/qdev-monitor.c14
2 files changed, 6 insertions, 37 deletions
diff --git a/hw/container.c b/hw/container.c
deleted file mode 100644
index 1e97031d07..0000000000
--- a/hw/container.c
+++ /dev/null
@@ -1,29 +0,0 @@
-#include "sysbus.h"
-
-static int container_initfn(SysBusDevice *dev)
-{
- return 0;
-}
-
-static void container_class_init(ObjectClass *klass, void *data)
-{
- DeviceClass *dc = DEVICE_CLASS(klass);
- SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
-
- k->init = container_initfn;
- dc->no_user = 1;
-}
-
-static TypeInfo container_info = {
- .name = "container",
- .parent = TYPE_SYS_BUS_DEVICE,
- .instance_size = sizeof(SysBusDevice),
- .class_init = container_class_init,
-};
-
-static void container_init(void)
-{
- type_register_static(&container_info);
-}
-
-device_init(container_init);
diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c
index 56a34587b8..135c2bf237 100644
--- a/hw/qdev-monitor.c
+++ b/hw/qdev-monitor.c
@@ -177,30 +177,28 @@ int qdev_device_help(QemuOpts *opts)
static Object *qdev_get_peripheral(void)
{
- static DeviceState *dev;
+ static Object *dev;
if (dev == NULL) {
- dev = qdev_create(NULL, "container");
+ dev = object_new("container");
object_property_add_child(object_get_root(), "peripheral",
OBJECT(dev), NULL);
- qdev_init_nofail(dev);
}
- return OBJECT(dev);
+ return dev;
}
static Object *qdev_get_peripheral_anon(void)
{
- static DeviceState *dev;
+ static Object *dev;
if (dev == NULL) {
- dev = qdev_create(NULL, "container");
+ dev = object_new("container");
object_property_add_child(object_get_root(), "peripheral-anon",
OBJECT(dev), NULL);
- qdev_init_nofail(dev);
}
- return OBJECT(dev);
+ return dev;
}
static void qbus_list_bus(DeviceState *dev)