Skip to content

Commit

Permalink
msmouse: convert to finalize
Browse files Browse the repository at this point in the history
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
  • Loading branch information
elmarco committed Jan 31, 2017
1 parent e96ebf4 commit 8955e89
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backends/msmouse.c
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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,
};

Expand Down

0 comments on commit 8955e89

Please sign in to comment.