Patchwork vmmouse: Register vmstate via qdev

login
register
mail settings
Submitter Jan Kiszka
Date March 21, 2011, 9:53 a.m.
Message ID <4D871FFC.7060607@siemens.com>
Download mbox | patch
Permalink /patch/87728/
State New
Headers show

Comments

Jan Kiszka - March 21, 2011, 9:53 a.m.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 hw/vmmouse.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Aurelien Jarno - March 22, 2011, 6:45 a.m.
On Mon, Mar 21, 2011 at 10:53:00AM +0100, Jan Kiszka wrote:
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  hw/vmmouse.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Thanks, applied.

> diff --git a/hw/vmmouse.c b/hw/vmmouse.c
> index ab8dbd6..1113f33 100644
> --- a/hw/vmmouse.c
> +++ b/hw/vmmouse.c
> @@ -265,7 +265,6 @@ static int vmmouse_initfn(ISADevice *dev)
>      vmport_register(VMMOUSE_STATUS, vmmouse_ioport_read, s);
>      vmport_register(VMMOUSE_COMMAND, vmmouse_ioport_read, s);
>      vmport_register(VMMOUSE_DATA, vmmouse_ioport_read, s);
> -    vmstate_register(NULL, 0, &vmstate_vmmouse, s);
>  
>      return 0;
>  }
> @@ -274,6 +273,7 @@ static ISADeviceInfo vmmouse_info = {
>      .init          = vmmouse_initfn,
>      .qdev.name     = "vmmouse",
>      .qdev.size     = sizeof(VMMouseState),
> +    .qdev.vmsd     = &vmstate_vmmouse,
>      .qdev.no_user  = 1,
>      .qdev.reset    = vmmouse_reset,
>      .qdev.props = (Property[]) {
> -- 
> 1.7.1
> 
>

Patch

diff --git a/hw/vmmouse.c b/hw/vmmouse.c
index ab8dbd6..1113f33 100644
--- a/hw/vmmouse.c
+++ b/hw/vmmouse.c
@@ -265,7 +265,6 @@  static int vmmouse_initfn(ISADevice *dev)
     vmport_register(VMMOUSE_STATUS, vmmouse_ioport_read, s);
     vmport_register(VMMOUSE_COMMAND, vmmouse_ioport_read, s);
     vmport_register(VMMOUSE_DATA, vmmouse_ioport_read, s);
-    vmstate_register(NULL, 0, &vmstate_vmmouse, s);
 
     return 0;
 }
@@ -274,6 +273,7 @@  static ISADeviceInfo vmmouse_info = {
     .init          = vmmouse_initfn,
     .qdev.name     = "vmmouse",
     .qdev.size     = sizeof(VMMouseState),
+    .qdev.vmsd     = &vmstate_vmmouse,
     .qdev.no_user  = 1,
     .qdev.reset    = vmmouse_reset,
     .qdev.props = (Property[]) {