From 8955e8914c3abce89f35edd1ceb82cfc971b62af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 8 Dec 2016 16:34:44 +0300 Subject: msmouse: convert to finalize MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake --- backends/msmouse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'backends/msmouse.c') diff --git a/backends/msmouse.c b/backends/msmouse.c index 936a5476d5..55c344f0e1 100644 --- a/backends/msmouse.c +++ b/backends/msmouse.c @@ -139,9 +139,9 @@ static int msmouse_chr_write(struct Chardev *s, const uint8_t *buf, int len) return len; } -static void msmouse_chr_free(struct Chardev *chr) +static void char_msmouse_finalize(Object *obj) { - MouseChardev *mouse = MOUSE_CHARDEV(chr); + MouseChardev *mouse = MOUSE_CHARDEV(obj); qemu_input_handler_unregister(mouse->hs); } @@ -172,13 +172,13 @@ static void char_msmouse_class_init(ObjectClass *oc, void *data) cc->open = msmouse_chr_open; cc->chr_write = msmouse_chr_write; cc->chr_accept_input = msmouse_chr_accept_input; - cc->chr_free = msmouse_chr_free; } static const TypeInfo char_msmouse_type_info = { .name = TYPE_CHARDEV_MSMOUSE, .parent = TYPE_CHARDEV, .instance_size = sizeof(MouseChardev), + .instance_finalize = char_msmouse_finalize, .class_init = char_msmouse_class_init, }; -- cgit v1.2.3