mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
vmmouse: replace PROP_PTR with PROP_LINK
While at it, use the expected type. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
parent
0ed40f16a1
commit
0fe4bb3241
4 changed files with 12 additions and 14 deletions
|
@ -66,7 +66,7 @@ typedef struct VMMouseState
|
|||
uint16_t status;
|
||||
uint8_t absolute;
|
||||
QEMUPutMouseEntry *entry;
|
||||
void *ps2_mouse;
|
||||
ISAKBDState *i8042;
|
||||
} VMMouseState;
|
||||
|
||||
static uint32_t vmmouse_get_status(VMMouseState *s)
|
||||
|
@ -105,7 +105,7 @@ static void vmmouse_mouse_event(void *opaque, int x, int y, int dz, int buttons_
|
|||
|
||||
/* need to still generate PS2 events to notify driver to
|
||||
read from queue */
|
||||
i8042_isa_mouse_fake_event(s->ps2_mouse);
|
||||
i8042_isa_mouse_fake_event(s->i8042);
|
||||
}
|
||||
|
||||
static void vmmouse_remove_handler(VMMouseState *s)
|
||||
|
@ -275,7 +275,7 @@ static void vmmouse_realizefn(DeviceState *dev, Error **errp)
|
|||
}
|
||||
|
||||
static Property vmmouse_properties[] = {
|
||||
DEFINE_PROP_PTR("ps2_mouse", VMMouseState, ps2_mouse),
|
||||
DEFINE_PROP_LINK("i8042", VMMouseState, i8042, TYPE_I8042, ISAKBDState *),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
|
@ -287,8 +287,6 @@ static void vmmouse_class_initfn(ObjectClass *klass, void *data)
|
|||
dc->reset = vmmouse_reset;
|
||||
dc->vmsd = &vmstate_vmmouse;
|
||||
dc->props = vmmouse_properties;
|
||||
/* Reason: pointer property "ps2_mouse" */
|
||||
dc->user_creatable = false;
|
||||
}
|
||||
|
||||
static const TypeInfo vmmouse_info = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue