Skip to content

Commit

Permalink
sysbus: sysbus_init_child_obj() is now unused, drop
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200610053247.1583243-52-armbru@redhat.com>
  • Loading branch information
Markus Armbruster committed Jun 15, 2020
1 parent 7089e0c commit 034b61d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
8 changes: 0 additions & 8 deletions hw/core/sysbus.c
Expand Up @@ -355,14 +355,6 @@ BusState *sysbus_get_default(void)
return main_system_bus;
}

void sysbus_init_child_obj(Object *parent, const char *childname, void *child,
size_t childsize, const char *childtype)
{
object_initialize_child_with_props(parent, childname, child, childsize,
childtype, &error_abort, NULL);
qdev_set_parent_bus(DEVICE(child), sysbus_get_default());
}

static void sysbus_register_types(void)
{
type_register_static(&system_bus_info);
Expand Down
17 changes: 0 additions & 17 deletions include/hw/sysbus.h
Expand Up @@ -93,23 +93,6 @@ MemoryRegion *sysbus_address_space(SysBusDevice *dev);
bool sysbus_realize(SysBusDevice *dev, Error **errp);
bool sysbus_realize_and_unref(SysBusDevice *dev, Error **errp);

/**
* sysbus_init_child_obj:
* @parent: The parent object
* @childname: Used as name of the "child<>" property in the parent
* @child: A pointer to the memory to be used for the object.
* @childsize: The maximum size available at @child for the object.
* @childtype: The name of the type of the object to instantiate.
*
* This function will initialize an object and attach it to the main system
* bus. The memory for the object should have already been allocated. The
* object will then be added as child to the given parent. The returned object
* has a reference count of 1 (for the "child<...>" property from the parent),
* so the object will be finalized automatically when the parent gets removed.
*/
void sysbus_init_child_obj(Object *parent, const char *childname, void *child,
size_t childsize, const char *childtype);

/* Call func for every dynamically created sysbus device in the system */
void foreach_dynamic_sysbus_device(FindSysbusDeviceFunc *func, void *opaque);

Expand Down

0 comments on commit 034b61d

Please sign in to comment.