qemu-char: move msmouse registeration to msmouse.c

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Message-id: b47d1153b0d7669743c9a6bb98ce30f4cf7f876b.1362505276.git.amit.shah@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Anthony Liguori 2013-03-05 23:21:31 +05:30
parent 08744c9811
commit 5ab8211b9e
3 changed files with 9 additions and 11 deletions

View file

@ -25,7 +25,6 @@
#include "qemu-common.h"
#include "char/char.h"
#include "ui/console.h"
#include "msmouse.h"
#define MSMOUSE_LO6(n) ((n) & 0x3f)
#define MSMOUSE_HI2(n) (((n) & 0xc0) >> 6)
@ -64,7 +63,7 @@ static void msmouse_chr_close (struct CharDriverState *chr)
g_free (chr);
}
CharDriverState *qemu_chr_open_msmouse(QemuOpts *opts)
static CharDriverState *qemu_chr_open_msmouse(QemuOpts *opts)
{
CharDriverState *chr;
@ -76,3 +75,10 @@ CharDriverState *qemu_chr_open_msmouse(QemuOpts *opts)
return chr;
}
static void register_types(void)
{
register_char_driver("msmouse", qemu_chr_open_msmouse);
}
type_init(register_types);

View file

@ -1,7 +0,0 @@
#ifndef HW_MSMOUSE_H
#define HW_MSMOUSE_H 1
/* msmouse.c */
CharDriverState *qemu_chr_open_msmouse(QemuOpts *opts);
#endif

View file

@ -28,7 +28,6 @@
#include "qemu/timer.h"
#include "char/char.h"
#include "hw/usb.h"
#include "hw/msmouse.h"
#include "qmp-commands.h"
#include <unistd.h>
@ -2179,6 +2178,7 @@ static CharDriverState *qemu_chr_open_win_stdio(QemuOpts *opts)
}
#endif /* !_WIN32 */
/***********************************************************/
/* UDP Net console */
@ -3663,7 +3663,6 @@ static void register_types(void)
register_char_driver("null", qemu_chr_open_null);
register_char_driver("socket", qemu_chr_open_socket);
register_char_driver("udp", qemu_chr_open_udp);
register_char_driver("msmouse", qemu_chr_open_msmouse);
register_char_driver("vc", vc_init);
register_char_driver("memory", qemu_chr_open_ringbuf);
#ifdef _WIN32