qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 19/54] mux: convert to finalize


From: Marc-André Lureau
Subject: [Qemu-devel] [PATCH 19/54] mux: convert to finalize
Date: Tue, 13 Dec 2016 01:42:50 +0300

Signed-off-by: Marc-André Lureau <address@hidden>
---
 qemu-char.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/qemu-char.c b/qemu-char.c
index d5656007da..3b08155a8f 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++) {
@@ -4018,7 +4018,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;
@@ -4029,6 +4028,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,
-- 
2.11.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]