From 68f84ff5c4ae41d9ded2bb2ee3a435dad944a02f Mon Sep 17 00:00:00 2001 Message-Id: <68f84ff5c4ae41d9ded2bb2ee3a435dad944a02f.1374754302.git.minovotn@redhat.com> In-Reply-To: <5d75a8513d08b33975bdf5971871c0c977167cd1.1374754301.git.minovotn@redhat.com> References: <5d75a8513d08b33975bdf5971871c0c977167cd1.1374754301.git.minovotn@redhat.com> From: Gerd Hoffmann Date: Mon, 24 Jun 2013 07:05:55 +0200 Subject: [PATCH 44/65] qemu-char: move msmouse registeration to msmouse.c RH-Author: Gerd Hoffmann Message-id: <1372057576-26450-45-git-send-email-kraxel@redhat.com> Patchwork-id: 52133 O-Subject: [RHEL-6.5 qemu-kvm PATCH v2 44/65] qemu-char: move msmouse registeration to msmouse.c Bugzilla: 676568 RH-Acked-by: Laszlo Ersek RH-Acked-by: Hans de Goede RH-Acked-by: Luiz Capitulino From: Anthony Liguori Signed-off-by: Anthony Liguori Signed-off-by: Amit Shah Message-id: b47d1153b0d7669743c9a6bb98ce30f4cf7f876b.1362505276.git.amit.shah@redhat.com Signed-off-by: Anthony Liguori (cherry picked from commit 5ab8211b9e1215ed136164c6d9622f2c928f7a8d) Conflicts: hw/msmouse.c hw/msmouse.h qemu-char.c --- hw/msmouse.c | 10 ++++++++-- hw/msmouse.h | 2 -- qemu-char.c | 3 +-- 3 files changed, 9 insertions(+), 6 deletions(-) delete mode 100644 hw/msmouse.h Signed-off-by: Michal Novotny --- hw/msmouse.c | 10 ++++++++-- hw/msmouse.h | 2 -- qemu-char.c | 3 +-- 3 files changed, 9 insertions(+), 6 deletions(-) delete mode 100644 hw/msmouse.h diff --git a/hw/msmouse.c b/hw/msmouse.c index 55c613e..56d1561 100644 --- a/hw/msmouse.c +++ b/hw/msmouse.c @@ -25,7 +25,6 @@ #include "../qemu-common.h" #include "../qemu-char.h" #include "../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) qemu_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); +} + +machine_init(register_types); diff --git a/hw/msmouse.h b/hw/msmouse.h deleted file mode 100644 index 456cb21..0000000 --- a/hw/msmouse.h +++ /dev/null @@ -1,2 +0,0 @@ -/* msmouse.c */ -CharDriverState *qemu_chr_open_msmouse(QemuOpts *opts); diff --git a/qemu-char.c b/qemu-char.c index 5ed483d..1b94c00 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -29,7 +29,6 @@ #include "qemu-timer.h" #include "qemu-char.h" #include "hw/usb.h" -#include "hw/msmouse.h" #include "qemu-objects.h" #include "qapi-visit.h" #include "qmp-commands.h" @@ -2009,6 +2008,7 @@ static CharDriverState *qemu_chr_open_win_file_out(QemuOpts *opts) } #endif /* !_WIN32 */ + /***********************************************************/ /* UDP Net console */ @@ -3222,7 +3222,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", text_console_init); #ifdef _WIN32 register_char_driver("file", qemu_chr_open_win_file_out); -- 1.7.11.7