mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-27 05:20:50 +00:00
acpi: serial-is: replace ISADeviceClass::build_aml with AcpiDevAmlIfClass:build_dev_aml
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Message-Id: <20220608135340.3304695-6-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
ef26fc47ba
commit
0d170dc13c
@ -27,7 +27,7 @@
|
||||
#include "qapi/error.h"
|
||||
#include "qemu/module.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "hw/acpi/aml-build.h"
|
||||
#include "hw/acpi/acpi_aml_interface.h"
|
||||
#include "hw/char/serial.h"
|
||||
#include "hw/isa/isa.h"
|
||||
#include "hw/qdev-properties.h"
|
||||
@ -83,9 +83,9 @@ static void serial_isa_realizefn(DeviceState *dev, Error **errp)
|
||||
isa_register_ioport(isadev, &s->io, isa->iobase);
|
||||
}
|
||||
|
||||
static void serial_isa_build_aml(ISADevice *isadev, Aml *scope)
|
||||
static void serial_isa_build_aml(AcpiDevAmlIf *adev, Aml *scope)
|
||||
{
|
||||
ISASerialState *isa = ISA_SERIAL(isadev);
|
||||
ISASerialState *isa = ISA_SERIAL(adev);
|
||||
Aml *dev;
|
||||
Aml *crs;
|
||||
|
||||
@ -122,11 +122,11 @@ static Property serial_isa_properties[] = {
|
||||
static void serial_isa_class_initfn(ObjectClass *klass, void *data)
|
||||
{
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
ISADeviceClass *isa = ISA_DEVICE_CLASS(klass);
|
||||
AcpiDevAmlIfClass *adevc = ACPI_DEV_AML_IF_CLASS(klass);
|
||||
|
||||
dc->realize = serial_isa_realizefn;
|
||||
dc->vmsd = &vmstate_isa_serial;
|
||||
isa->build_aml = serial_isa_build_aml;
|
||||
adevc->build_dev_aml = serial_isa_build_aml;
|
||||
device_class_set_props(dc, serial_isa_properties);
|
||||
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
|
||||
}
|
||||
@ -146,6 +146,10 @@ static const TypeInfo serial_isa_info = {
|
||||
.instance_size = sizeof(ISASerialState),
|
||||
.instance_init = serial_isa_initfn,
|
||||
.class_init = serial_isa_class_initfn,
|
||||
.interfaces = (InterfaceInfo[]) {
|
||||
{ TYPE_ACPI_DEV_AML_IF },
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
static void serial_register_types(void)
|
||||
|
Loading…
Reference in New Issue
Block a user