summaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2016-03-04 08:42:40 -0700
committerMarkus Armbruster <armbru@redhat.com>2016-03-05 10:42:03 +0100
commitb1918fbb1ca080758390a0aee0588e59908d93e2 (patch)
tree2688ff668560944ecf172c687df49fe656560b7a /backends
parent10f759079e616a1cc4701fc26ab5e2a048ce912c (diff)
downloadqemu-b1918fbb1ca080758390a0aee0588e59908d93e2.tar.gz
qemu-b1918fbb1ca080758390a0aee0588e59908d93e2.tar.bz2
qemu-b1918fbb1ca080758390a0aee0588e59908d93e2.zip
chardev: Drop useless ChardevDummy type
Commit d0d7708b made ChardevDummy be an empty wrapper type around ChardevCommon. But there is no technical reason for this indirection, so simplify the code by directly using the base type. Also change the fallback assignment to assign u.null rather than u.data, since a future patch will remove the data member of the C struct generated for QAPI unions. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-Id: <1457106160-23614-1-git-send-email-eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'backends')
-rw-r--r--backends/baum.c2
-rw-r--r--backends/msmouse.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/backends/baum.c b/backends/baum.c
index 374562a483..c11320eecf 100644
--- a/backends/baum.c
+++ b/backends/baum.c
@@ -567,7 +567,7 @@ static CharDriverState *chr_baum_init(const char *id,
ChardevReturn *ret,
Error **errp)
{
- ChardevCommon *common = qapi_ChardevDummy_base(backend->u.braille);
+ ChardevCommon *common = backend->u.braille;
BaumDriverState *baum;
CharDriverState *chr;
brlapi_handle_t *handle;
diff --git a/backends/msmouse.c b/backends/msmouse.c
index 9a82efda9e..5e1833c6e6 100644
--- a/backends/msmouse.c
+++ b/backends/msmouse.c
@@ -68,7 +68,7 @@ static CharDriverState *qemu_chr_open_msmouse(const char *id,
ChardevReturn *ret,
Error **errp)
{
- ChardevCommon *common = qapi_ChardevDummy_base(backend->u.msmouse);
+ ChardevCommon *common = backend->u.msmouse;
CharDriverState *chr;
chr = qemu_chr_alloc(common, errp);