diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2016-12-09 11:04:51 +0300 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2017-01-31 13:03:42 +0400 |
commit | 0b663b7d77f1a2170fe30a91e3d6de1bb769a378 (patch) | |
tree | 25d68b2d6118898621c3c79d30b32c6534865a3a /backends | |
parent | 279b066e4c21825c60ea04c4860a1839e1867743 (diff) |
char: remove class kind field
The class kind is necessary to lookup the chardev name in
qmp_chardev_add() after calling qemu_chr_new_from_opts() and to set
the appropriate ChardevBackend (mainly to free the right
fields).
qemu_chr_new_from_opts() can be changed to use a non-qmp function
using the chardev class typename. Introduce qemu_chardev_add() to be
called from qemu_chr_new_from_opts() and remove the class chardev kind
field. Set the backend->type in the parse callback (when non-common
fields are added).
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'backends')
-rw-r--r-- | backends/baum.c | 1 | ||||
-rw-r--r-- | backends/msmouse.c | 1 | ||||
-rw-r--r-- | backends/testdev.c | 1 |
3 files changed, 0 insertions, 3 deletions
diff --git a/backends/baum.c b/backends/baum.c index 5316c8da0a..2eddcae119 100644 --- a/backends/baum.c +++ b/backends/baum.c @@ -656,7 +656,6 @@ static void char_braille_class_init(ObjectClass *oc, void *data) { ChardevClass *cc = CHARDEV_CLASS(oc); - cc->kind = CHARDEV_BACKEND_KIND_BRAILLE; cc->open = baum_chr_open; cc->chr_write = baum_chr_write; cc->chr_accept_input = baum_chr_accept_input; diff --git a/backends/msmouse.c b/backends/msmouse.c index 28689b3e29..d2c3162f1e 100644 --- a/backends/msmouse.c +++ b/backends/msmouse.c @@ -169,7 +169,6 @@ static void char_msmouse_class_init(ObjectClass *oc, void *data) { ChardevClass *cc = CHARDEV_CLASS(oc); - cc->kind = CHARDEV_BACKEND_KIND_MSMOUSE; cc->open = msmouse_chr_open; cc->chr_write = msmouse_chr_write; cc->chr_accept_input = msmouse_chr_accept_input; diff --git a/backends/testdev.c b/backends/testdev.c index 243454aaa3..7df9248a13 100644 --- a/backends/testdev.c +++ b/backends/testdev.c @@ -111,7 +111,6 @@ static void char_testdev_class_init(ObjectClass *oc, void *data) { ChardevClass *cc = CHARDEV_CLASS(oc); - cc->kind = CHARDEV_BACKEND_KIND_TESTDEV; cc->chr_write = testdev_chr_write; } |