char: remove chardevs list
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 14 Dec 2016 19:47:29 +0000 (22:47 +0300)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 4 May 2017 11:34:41 +0000 (15:34 +0400)
The list is now empty, the chardev cleanup is taken care of by the unref
of the root container.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
chardev/char.c
include/sysemu/char.h

index 276d27f403cc3ad8f5ebe1c77b31636219691197..aee8b4555da9a558178468e6016e8e197268a994 100644 (file)
@@ -42,9 +42,6 @@
 /***********************************************************/
 /* character device */
 
-static QTAILQ_HEAD(ChardevHead, Chardev) chardevs =
-    QTAILQ_HEAD_INITIALIZER(chardevs);
-
 static Object *get_chardevs_root(void)
 {
     return container_get(object_get_root(), "/chardevs");
@@ -418,9 +415,6 @@ static void char_finalize(Object *obj)
 {
     Chardev *chr = CHARDEV(obj);
 
-    if (QTAILQ_IN_USE(chr, next)) {
-        QTAILQ_REMOVE(&chardevs, chr, next);
-    }
     if (chr->be) {
         chr->be->chr = NULL;
     }
index 98903f31e4ddf6b003c7e0bc1ee03d3f7116b072..729d186d011c5145ec3ca514ff39169a6a1c5048 100644 (file)
@@ -95,7 +95,6 @@ struct Chardev {
     int be_open;
     guint fd_in_tag;
     DECLARE_BITMAP(features, QEMU_CHAR_FEATURE_LAST);
-    QTAILQ_ENTRY(Chardev) next;
 };
 
 /**