Skip to content

Commit

Permalink
hw/virtio: Add VirtioPCIDeviceTypeInfo::instance_finalize field
Browse files Browse the repository at this point in the history
The VirtioPCIDeviceTypeInfo structure, added in commit a4ee4c8
("virtio: Helper for registering virtio device types") got extended
in commit 8ea90ee ("virtio: add class_size") with the @class_size
field. Do similarly with the @instance_finalize field.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20231121174051.63038-2-philmd@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit 837053a)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
  • Loading branch information
philmd authored and Michael Tokarev committed Dec 5, 2023
1 parent f5584a7 commit fbca2cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions hw/virtio/virtio-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2388,6 +2388,7 @@ void virtio_pci_types_register(const VirtioPCIDeviceTypeInfo *t)
.parent = t->parent ? t->parent : TYPE_VIRTIO_PCI,
.instance_size = t->instance_size,
.instance_init = t->instance_init,
.instance_finalize = t->instance_finalize,
.class_size = t->class_size,
.abstract = true,
.interfaces = t->interfaces,
Expand Down
1 change: 1 addition & 0 deletions include/hw/virtio/virtio-pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ typedef struct VirtioPCIDeviceTypeInfo {
size_t instance_size;
size_t class_size;
void (*instance_init)(Object *obj);
void (*instance_finalize)(Object *obj);
void (*class_init)(ObjectClass *klass, void *data);
InterfaceInfo *interfaces;
} VirtioPCIDeviceTypeInfo;
Expand Down

0 comments on commit fbca2cb

Please sign in to comment.