diff options
Diffstat (limited to 'hw/display/cg3.c')
-rw-r--r-- | hw/display/cg3.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/display/cg3.c b/hw/display/cg3.c index 7cbe6e56ff..d66ba9ad6a 100644 --- a/hw/display/cg3.c +++ b/hw/display/cg3.c @@ -36,6 +36,7 @@ #include "qemu/log.h" #include "qemu/module.h" #include "trace.h" +#include "qom/object.h" /* Change to 1 to enable debugging */ #define DEBUG_CG3 0 @@ -65,9 +66,11 @@ #define CG3_VRAM_OFFSET 0x800000 #define TYPE_CG3 "cgthree" -#define CG3(obj) OBJECT_CHECK(CG3State, (obj), TYPE_CG3) +typedef struct CG3State CG3State; +DECLARE_INSTANCE_CHECKER(CG3State, CG3, + TYPE_CG3) -typedef struct CG3State { +struct CG3State { SysBusDevice parent_obj; QemuConsole *con; @@ -82,7 +85,7 @@ typedef struct CG3State { uint8_t r[256], g[256], b[256]; uint16_t width, height, depth; uint8_t dac_index, dac_state; -} CG3State; +}; static void cg3_update_display(void *opaque) { |