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