Patchwork [6/9] usb-wacom doesn't support migration

login
register
mail settings
Submitter Gerd Hoffmann
Date July 20, 2011, 10:09 a.m.
Message ID <1311156579-9814-7-git-send-email-kraxel@redhat.com>
Download mbox | patch
Permalink /patch/105639/
State New
Headers show

Comments

Gerd Hoffmann - July 20, 2011, 10:09 a.m.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/usb-wacom.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
Paolo Bonzini - July 29, 2011, 3:57 p.m.
On 07/20/2011 12:09 PM, Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann<kraxel@redhat.com>
> ---
>   hw/usb-wacom.c |    6 ++++++
>   1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/hw/usb-wacom.c b/hw/usb-wacom.c
> index 9d348e1..d76ee97 100644
> --- a/hw/usb-wacom.c
> +++ b/hw/usb-wacom.c
> @@ -349,6 +349,11 @@ static int usb_wacom_initfn(USBDevice *dev)
>       return 0;
>   }
>
> +static const VMStateDescription vmstate_usb_wacom = {
> +    .name = "usb-wacom",
> +    .unmigratable = 1,
> +};
> +
>   static struct USBDeviceInfo wacom_info = {
>       .product_desc   = "QEMU PenPartner Tablet",
>       .qdev.name      = "usb-wacom-tablet",
> @@ -356,6 +361,7 @@ static struct USBDeviceInfo wacom_info = {
>       .usbdevice_name = "wacom-tablet",
>       .usb_desc       =&desc_wacom,
>       .qdev.size      = sizeof(USBWacomState),
> +    .qdev.vmsd      =&vmstate_usb_wacom,
>       .init           = usb_wacom_initfn,
>       .handle_packet  = usb_generic_handle_packet,
>       .handle_reset   = usb_wacom_handle_reset,

Since usb_wacom does not support auto-wakeup, it should actually kinda 
sorta work like usb-tablet used to, right?

Paolo

Patch

diff --git a/hw/usb-wacom.c b/hw/usb-wacom.c
index 9d348e1..d76ee97 100644
--- a/hw/usb-wacom.c
+++ b/hw/usb-wacom.c
@@ -349,6 +349,11 @@  static int usb_wacom_initfn(USBDevice *dev)
     return 0;
 }
 
+static const VMStateDescription vmstate_usb_wacom = {
+    .name = "usb-wacom",
+    .unmigratable = 1,
+};
+
 static struct USBDeviceInfo wacom_info = {
     .product_desc   = "QEMU PenPartner Tablet",
     .qdev.name      = "usb-wacom-tablet",
@@ -356,6 +361,7 @@  static struct USBDeviceInfo wacom_info = {
     .usbdevice_name = "wacom-tablet",
     .usb_desc       = &desc_wacom,
     .qdev.size      = sizeof(USBWacomState),
+    .qdev.vmsd      = &vmstate_usb_wacom,
     .init           = usb_wacom_initfn,
     .handle_packet  = usb_generic_handle_packet,
     .handle_reset   = usb_wacom_handle_reset,