migration/rdma: Fix or document problematic uses of errno
[qemu/armbru.git] / hw / acpi / acpi_interface.c
blob8637ff18fca2a00c1cb98738364a29df1cceb70c
1 #include "qemu/osdep.h"
2 #include "hw/acpi/acpi_dev_interface.h"
3 #include "hw/acpi/acpi_aml_interface.h"
4 #include "qemu/module.h"
5 #include "qemu/queue.h"
7 void acpi_send_event(DeviceState *dev, AcpiEventStatusBits event)
9 AcpiDeviceIfClass *adevc = ACPI_DEVICE_IF_GET_CLASS(dev);
10 if (adevc->send_event) {
11 AcpiDeviceIf *adev = ACPI_DEVICE_IF(dev);
12 adevc->send_event(adev, event);
16 void qbus_build_aml(BusState *bus, Aml *scope)
18 BusChild *kid;
20 QTAILQ_FOREACH(kid, &bus->children, sibling) {
21 call_dev_aml_func(DEVICE(kid->child), scope);
25 static void register_types(void)
27 static const TypeInfo acpi_dev_if_info = {
28 .name = TYPE_ACPI_DEVICE_IF,
29 .parent = TYPE_INTERFACE,
30 .class_size = sizeof(AcpiDeviceIfClass),
32 static const TypeInfo acpi_dev_aml_if_info = {
33 .name = TYPE_ACPI_DEV_AML_IF,
34 .parent = TYPE_INTERFACE,
35 .class_size = sizeof(AcpiDevAmlIfClass),
39 type_register_static(&acpi_dev_if_info);
40 type_register_static(&acpi_dev_aml_if_info);
43 type_init(register_types)