diff options
| author | Juan Quintela <quintela@redhat.com> | 2014-09-23 14:09:54 +0200 |
|---|---|---|
| committer | Juan Quintela <quintela@redhat.com> | 2015-06-12 06:53:57 +0200 |
| commit | 5cd8cadae8db905afcbf877cae568c27d1d55a8a (patch) | |
| tree | d6932290619f414a963ffb2a330e42bda1437492 /hw/usb/hcd-ohci.c | |
| parent | 0163a2e025cda6acb33e100d296965671ace17d9 (diff) | |
| download | focaccia-qemu-5cd8cadae8db905afcbf877cae568c27d1d55a8a.tar.gz focaccia-qemu-5cd8cadae8db905afcbf877cae568c27d1d55a8a.zip | |
migration: Use normal VMStateDescriptions for Subsections
We create optional sections with this patch. But we already have optional subsections. Instead of having two mechanism that do the same, we can just generalize it. For subsections we just change: - Add a needed function to VMStateDescription - Remove VMStateSubsection (after removal of the needed function it is just a VMStateDescription) - Adjust the whole tree, moving the needed function to the corresponding VMStateDescription Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'hw/usb/hcd-ohci.c')
| -rw-r--r-- | hw/usb/hcd-ohci.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index 1a22c9c0cb..7d65818064 100644 --- a/hw/usb/hcd-ohci.c +++ b/hw/usb/hcd-ohci.c @@ -2034,6 +2034,7 @@ static const VMStateDescription vmstate_ohci_eof_timer = { .version_id = 1, .minimum_version_id = 1, .pre_load = ohci_eof_timer_pre_load, + .needed = ohci_eof_timer_needed, .fields = (VMStateField[]) { VMSTATE_TIMER_PTR(eof_timer, OHCIState), VMSTATE_END_OF_LIST() @@ -2081,13 +2082,9 @@ static const VMStateDescription vmstate_ohci_state = { VMSTATE_BOOL(async_complete, OHCIState), VMSTATE_END_OF_LIST() }, - .subsections = (VMStateSubsection []) { - { - .vmsd = &vmstate_ohci_eof_timer, - .needed = ohci_eof_timer_needed, - } , { - /* empty */ - } + .subsections = (const VMStateDescription*[]) { + &vmstate_ohci_eof_timer, + NULL } }; |