aboutsummaryrefslogtreecommitdiff
path: root/hw/display/vga-pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/display/vga-pci.c')
-rw-r--r--hw/display/vga-pci.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c
index a640fd866d..3b45fa3bad 100644
--- a/hw/display/vga-pci.c
+++ b/hw/display/vga-pci.c
@@ -34,6 +34,7 @@
#include "qemu/timer.h"
#include "hw/loader.h"
#include "hw/display/edid.h"
+#include "qom/object.h"
enum vga_pci_flags {
PCI_VGA_FLAG_ENABLE_MMIO = 1,
@@ -41,7 +42,7 @@ enum vga_pci_flags {
PCI_VGA_FLAG_ENABLE_EDID = 3,
};
-typedef struct PCIVGAState {
+struct PCIVGAState {
PCIDevice dev;
VGACommonState vga;
uint32_t flags;
@@ -49,10 +50,12 @@ typedef struct PCIVGAState {
MemoryRegion mmio;
MemoryRegion mrs[4];
uint8_t edid[256];
-} PCIVGAState;
+};
+typedef struct PCIVGAState PCIVGAState;
#define TYPE_PCI_VGA "pci-vga"
-#define PCI_VGA(obj) OBJECT_CHECK(PCIVGAState, (obj), TYPE_PCI_VGA)
+DECLARE_INSTANCE_CHECKER(PCIVGAState, PCI_VGA,
+ TYPE_PCI_VGA)
static const VMStateDescription vmstate_vga_pci = {
.name = "vga",