aboutsummaryrefslogtreecommitdiff
path: root/hw/qdev.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-12-09 15:02:56 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2012-02-03 10:41:06 -0600
commitd307af795d9fb25680339288a10c9e297e102826 (patch)
tree2fae1b3bd2db550e686ecd3d3031600b099cad4e /hw/qdev.c
parent39bffca2030950ef6efe57c2fac8327a45ae1015 (diff)
qdev: kill off DeviceInfo
It is no longer used in the tree since everything is done natively through QEMU Object Model. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/qdev.c')
-rw-r--r--hw/qdev.c70
1 files changed, 1 insertions, 69 deletions
diff --git a/hw/qdev.c b/hw/qdev.c
index a30a1c263d..4f6c3a713a 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -43,49 +43,6 @@ static BusState *qbus_find_recursive(BusState *bus, const char *name,
static BusState *qbus_find(const char *path);
/* Register a new device type. */
-static void qdev_subclass_init(ObjectClass *klass, void *data)
-{
- DeviceClass *dc = DEVICE_CLASS(klass);
- DeviceInfo *info = data;
-
- if (info->fw_name) {
- dc->fw_name = info->fw_name;
- }
- if (info->alias) {
- dc->alias = info->alias;
- }
- if (info->desc) {
- dc->desc = info->desc;
- }
- if (info->props) {
- dc->props = info->props;
- }
- if (info->no_user) {
- dc->no_user = info->no_user;
- }
- if (info->reset) {
- dc->reset = info->reset;
- }
- if (info->vmsd) {
- dc->vmsd = info->vmsd;
- }
- if (info->init) {
- dc->init = info->init;
- }
- if (info->unplug) {
- dc->unplug = info->unplug;
- }
- if (info->exit) {
- dc->exit = info->exit;
- }
- if (info->bus_info) {
- dc->bus_info = info->bus_info;
- }
- if (info->class_init) {
- info->class_init(klass, data);
- }
-}
-
const VMStateDescription *qdev_get_vmsd(DeviceState *dev)
{
DeviceClass *dc = DEVICE_GET_CLASS(dev);
@@ -117,30 +74,6 @@ const char *qdev_fw_name(DeviceState *dev)
return object_get_typename(OBJECT(dev));
}
-static void qdev_do_register_subclass(DeviceInfo *info, const char *parent,
- const char *name)
-{
- TypeInfo type_info = {};
-
- assert(info->size >= sizeof(DeviceState));
-
- type_info.name = name;
- type_info.parent = parent;
- type_info.instance_size = info->size;
- type_info.class_init = qdev_subclass_init;
- type_info.class_data = info;
-
- type_register_static(&type_info);
-}
-
-void qdev_register_subclass(DeviceInfo *info, const char *parent)
-{
- qdev_do_register_subclass(info, parent, info->name);
- if (info->alias) {
- qdev_do_register_subclass(info, parent, info->alias);
- }
-}
-
bool qdev_exists(const char *name)
{
return !!object_class_by_name(name);
@@ -406,8 +339,7 @@ int qdev_init(DeviceState *dev)
assert(dev->state == DEV_STATE_CREATED);
- /* FIXME hopefully this doesn't break anything */
- rc = dc->init(dev, NULL);
+ rc = dc->init(dev);
if (rc < 0) {
qdev_free(dev);
return rc;