From patchwork Mon Feb 18 21:48:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [14/19] qemu-char: move spice registration to spice-qemu-char.c Date: Mon, 18 Feb 2013 11:48:11 -0000 From: Anthony Liguori X-Patchwork-Id: 221520 Message-Id: <1361224096-21075-15-git-send-email-aliguori@us.ibm.com> To: qemu-devel@nongnu.org Cc: Amit Shah , Paolo Bonzini , Anthony Liguori Signed-off-by: Anthony Liguori --- qemu-char.c | 6 ------ spice-qemu-char.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 0c375f9..8b4c9a5 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -3681,12 +3681,6 @@ static void register_types(void) || defined(__FreeBSD_kernel__) register_char_driver("parport", qemu_chr_open_pp); #endif -#ifdef CONFIG_SPICE - register_char_driver("spicevmc", qemu_chr_open_spice); -#if SPICE_SERVER_VERSION >= 0x000c02 - register_char_driver("spiceport", qemu_chr_open_spice_port); -#endif -#endif } type_init(register_types); diff --git a/spice-qemu-char.c b/spice-qemu-char.c index a4d7de8..aea3d24 100644 --- a/spice-qemu-char.c +++ b/spice-qemu-char.c @@ -307,3 +307,13 @@ void qemu_spice_register_ports(void) } } #endif + +static void register_types(void) +{ + register_char_driver("spicevmc", qemu_chr_open_spice); +#if SPICE_SERVER_VERSION >= 0x000c02 + register_char_driver("spiceport", qemu_chr_open_spice_port); +#endif +} + +type_init(register_types);