aboutsummaryrefslogtreecommitdiff
path: root/chardev/char.c
diff options
context:
space:
mode:
Diffstat (limited to 'chardev/char.c')
-rw-r--r--chardev/char.c35
1 files changed, 1 insertions, 34 deletions
diff --git a/chardev/char.c b/chardev/char.c
index 807be52300..77e7ec814f 100644
--- a/chardev/char.c
+++ b/chardev/char.c
@@ -45,7 +45,7 @@
/***********************************************************/
/* character device */
-static Object *get_chardevs_root(void)
+Object *get_chardevs_root(void)
{
return container_get(object_get_root(), "/chardevs");
}
@@ -305,33 +305,6 @@ static const TypeInfo char_type_info = {
.class_init = char_class_init,
};
-static int chardev_machine_done_notify_one(Object *child, void *opaque)
-{
- Chardev *chr = (Chardev *)child;
- ChardevClass *class = CHARDEV_GET_CLASS(chr);
-
- if (class->chr_machine_done) {
- return class->chr_machine_done(chr);
- }
-
- return 0;
-}
-
-static void chardev_machine_done_hook(Notifier *notifier, void *unused)
-{
- int ret = object_child_foreach(get_chardevs_root(),
- chardev_machine_done_notify_one, NULL);
-
- if (ret) {
- error_report("Failed to call chardev machine_done hooks");
- exit(1);
- }
-}
-
-static Notifier chardev_machine_done_notify = {
- .notify = chardev_machine_done_hook,
-};
-
static bool qemu_chr_is_busy(Chardev *s)
{
if (CHARDEV_IS_MUX(s)) {
@@ -1198,12 +1171,6 @@ void qemu_chr_cleanup(void)
static void register_types(void)
{
type_register_static(&char_type_info);
-
- /* this must be done after machine init, since we register FEs with muxes
- * as part of realize functions like serial_isa_realizefn when -nographic
- * is specified
- */
- qemu_add_machine_init_done_notifier(&chardev_machine_done_notify);
}
type_init(register_types);