diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2020-08-25 15:19:59 -0400 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2020-08-27 14:04:54 -0400 |
commit | bd7dff94607c77bbcb54295bcd075a79513e2c52 (patch) | |
tree | a0f9b63390b34ed8ea057b203aa7536000235fef | |
parent | 2e0aec15905571fc485bff0ff9138c3bac48a5ad (diff) | |
download | qemu-bd7dff94607c77bbcb54295bcd075a79513e2c52.zip qemu-bd7dff94607c77bbcb54295bcd075a79513e2c52.tar.gz qemu-bd7dff94607c77bbcb54295bcd075a79513e2c52.tar.bz2 |
vmw_pvscsi: Rename QOM class cast macros
Rename the PVSCSI_DEVICE_CLASS() and PVSCSI_DEVICE_GET_CLASS()
macros to be consistent with the PVSCSI() instance cast macro.
This will allow us to register the type cast macros using
OBJECT_DECLARE_TYPE later.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com>
Message-Id: <20200825192110.3528606-4-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
-rw-r--r-- | hw/scsi/vmw_pvscsi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c index df07ab6..c071e0c 100644 --- a/hw/scsi/vmw_pvscsi.c +++ b/hw/scsi/vmw_pvscsi.c @@ -64,9 +64,9 @@ typedef struct PVSCSIClass { #define TYPE_PVSCSI "pvscsi" #define PVSCSI(obj) OBJECT_CHECK(PVSCSIState, (obj), TYPE_PVSCSI) -#define PVSCSI_DEVICE_CLASS(klass) \ +#define PVSCSI_CLASS(klass) \ OBJECT_CLASS_CHECK(PVSCSIClass, (klass), TYPE_PVSCSI) -#define PVSCSI_DEVICE_GET_CLASS(obj) \ +#define PVSCSI_GET_CLASS(obj) \ OBJECT_GET_CLASS(PVSCSIClass, (obj), TYPE_PVSCSI) /* Compatibility flags for migration */ @@ -1265,7 +1265,7 @@ static Property pvscsi_properties[] = { static void pvscsi_realize(DeviceState *qdev, Error **errp) { - PVSCSIClass *pvs_c = PVSCSI_DEVICE_GET_CLASS(qdev); + PVSCSIClass *pvs_c = PVSCSI_GET_CLASS(qdev); PCIDevice *pci_dev = PCI_DEVICE(qdev); PVSCSIState *s = PVSCSI(qdev); @@ -1280,7 +1280,7 @@ static void pvscsi_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); - PVSCSIClass *pvs_k = PVSCSI_DEVICE_CLASS(klass); + PVSCSIClass *pvs_k = PVSCSI_CLASS(klass); HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(klass); k->realize = pvscsi_realizefn; |