acpi: add aml_device() term
Signed-off-by: Igor Mammedov <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
011bb7490b
commit
be06ebd0a4
|
@ -355,3 +355,14 @@ Aml *aml_scope(const char *name_format, ...)
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
return var;
|
return var;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ACPI 1.0b: 16.2.5.2 Named Objects Encoding: DefDevice */
|
||||||
|
Aml *aml_device(const char *name_format, ...)
|
||||||
|
{
|
||||||
|
va_list ap;
|
||||||
|
Aml *var = aml_bundle(0x82 /* DeviceOp */, AML_EXT_PACKAGE);
|
||||||
|
va_start(ap, name_format);
|
||||||
|
build_append_namestringv(var->buf, name_format, ap);
|
||||||
|
va_end(ap);
|
||||||
|
return var;
|
||||||
|
}
|
||||||
|
|
|
@ -61,6 +61,7 @@ void aml_append(Aml *parent_ctx, Aml *child);
|
||||||
|
|
||||||
/* Block AML object primitives */
|
/* Block AML object primitives */
|
||||||
Aml *aml_scope(const char *name_format, ...) GCC_FMT_ATTR(1, 2);
|
Aml *aml_scope(const char *name_format, ...) GCC_FMT_ATTR(1, 2);
|
||||||
|
Aml *aml_device(const char *name_format, ...) GCC_FMT_ATTR(1, 2);
|
||||||
|
|
||||||
/* other helpers */
|
/* other helpers */
|
||||||
GArray *build_alloc_array(void);
|
GArray *build_alloc_array(void);
|
||||||
|
|
Loading…
Reference in a new issue