blob: c668d361f64fdc0a9ce9fe317ae065d0567d3e2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#include "qemu/osdep.h"
#include "hw/acpi/acpi_dev_interface.h"
#include "hw/acpi/acpi_aml_interface.h"
#include "qemu/module.h"
void acpi_send_event(DeviceState *dev, AcpiEventStatusBits event)
{
AcpiDeviceIfClass *adevc = ACPI_DEVICE_IF_GET_CLASS(dev);
if (adevc->send_event) {
AcpiDeviceIf *adev = ACPI_DEVICE_IF(dev);
adevc->send_event(adev, event);
}
}
static void register_types(void)
{
static const TypeInfo acpi_dev_if_info = {
.name = TYPE_ACPI_DEVICE_IF,
.parent = TYPE_INTERFACE,
.class_size = sizeof(AcpiDeviceIfClass),
};
static const TypeInfo acpi_dev_aml_if_info = {
.name = TYPE_ACPI_DEV_AML_IF,
.parent = TYPE_INTERFACE,
.class_size = sizeof(AcpiDevAmlIfClass),
};
type_register_static(&acpi_dev_if_info);
type_register_static(&acpi_dev_aml_if_info);
}
type_init(register_types)
|