Alexey Kardashevskiy <a...@ozlabs.ru> writes:

> This adds migration support for OHCI.
>
> Signed-off-by: Alexey Kardashevskiy <a...@ozlabs.ru>

Reviewed-by: Mike Day <ncm...@ncultra.org>

> ---
>  hw/usb/hcd-ohci.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c
> index e38cdeb..c42e091 100644
> --- a/hw/usb/hcd-ohci.c
> +++ b/hw/usb/hcd-ohci.c
> @@ -1984,6 +1984,17 @@ static Property ohci_pci_properties[] = {
>      DEFINE_PROP_END_OF_LIST(),
>  };
>  
> +static const VMStateDescription vmstate_ohci = {
> +    .name = "ohci",
> +    .version_id = 1,
> +    .minimum_version_id = 1,
> +    .minimum_version_id_old = 1,
> +    .fields      = (VMStateField[]) {
> +        VMSTATE_PCI_DEVICE(parent_obj, OHCIPCIState),
> +        VMSTATE_END_OF_LIST()
> +    }
> +};
> +
>  static void ohci_pci_class_init(ObjectClass *klass, void *data)
>  {
>      DeviceClass *dc = DEVICE_CLASS(klass);
> @@ -1997,6 +2008,7 @@ static void ohci_pci_class_init(ObjectClass *klass, 
> void *data)
>      set_bit(DEVICE_CATEGORY_USB, dc->categories);
>      dc->desc = "Apple USB Controller";
>      dc->props = ohci_pci_properties;
> +    dc->vmsd = &vmstate_ohci;
>  }
>  
>  static const TypeInfo ohci_pci_info = {
> -- 
> 1.8.4.rc4
>
>


Reply via email to