aboutsummaryrefslogtreecommitdiff
path: root/qemu-char.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2016-12-08 16:48:15 +0300
committerMarc-André Lureau <marcandre.lureau@redhat.com>2017-01-31 13:01:46 +0400
commit980d0414ce63ac61288c8b56a52729e64fd011a8 (patch)
tree74f30725ba7f933ae904fdd65cc6993a95595066 /qemu-char.c
parent8955e8914c3abce89f35edd1ceb82cfc971b62af (diff)
mux: convert to finalize
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'qemu-char.c')
-rw-r--r--qemu-char.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/qemu-char.c b/qemu-char.c
index 6b4a299702..91ca4cb083 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -859,9 +859,9 @@ static GSource *mux_chr_add_watch(Chardev *s, GIOCondition cond)
return cc->chr_add_watch(chr, cond);
}
-static void mux_chr_free(struct Chardev *chr)
+static void char_mux_finalize(Object *obj)
{
- MuxChardev *d = MUX_CHARDEV(chr);
+ MuxChardev *d = MUX_CHARDEV(obj);
int i;
for (i = 0; i < d->mux_cnt; i++) {
@@ -4025,7 +4025,6 @@ static void char_mux_class_init(ObjectClass *oc, void *data)
ChardevClass *cc = CHARDEV_CLASS(oc);
cc->open = qemu_chr_open_mux;
- cc->chr_free = mux_chr_free;
cc->chr_write = mux_chr_write;
cc->chr_accept_input = mux_chr_accept_input;
cc->chr_add_watch = mux_chr_add_watch;
@@ -4036,6 +4035,7 @@ static const TypeInfo char_mux_type_info = {
.parent = TYPE_CHARDEV,
.class_init = char_mux_class_init,
.instance_size = sizeof(MuxChardev),
+ .instance_finalize = char_mux_finalize,
};
static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,