#include "qemu/timer.h"
#include "hw/loader.h"
#include "hw/qdev-properties.h"
+#include "qom/object.h"
#define TYPE_ISA_VGA "isa-vga"
-#define ISA_VGA(obj) OBJECT_CHECK(ISAVGAState, (obj), TYPE_ISA_VGA)
+OBJECT_DECLARE_SIMPLE_TYPE(ISAVGAState, ISA_VGA)
-typedef struct ISAVGAState {
+struct ISAVGAState {
ISADevice parent_obj;
struct VGACommonState state;
PortioList portio_vga;
PortioList portio_vbe;
-} ISAVGAState;
+};
static void vga_isa_reset(DeviceState *dev)
{
0x000a0000,
vga_io_memory, 1);
memory_region_set_coalescing(vga_io_memory);
- s->con = graphic_console_init(DEVICE(dev), 0, s->hw_ops, s);
+ s->con = graphic_console_init(dev, 0, s->hw_ops, s);
memory_region_add_subregion(isa_address_space(isadev),
VBE_DISPI_LFB_PHYSICAL_ADDRESS,
dc->realize = vga_isa_realizefn;
dc->reset = vga_isa_reset;
dc->vmsd = &vmstate_vga_common;
- dc->props = vga_isa_properties;
+ device_class_set_props(dc, vga_isa_properties);
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
}