acpi: add aml_call0() helper
it will help to call a method with 0 arguments 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> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
This commit is contained in:
parent
7059eb4262
commit
7b38ba9cb6
@ -539,6 +539,14 @@ Aml *aml_notify(Aml *arg1, Aml *arg2)
|
||||
return var;
|
||||
}
|
||||
|
||||
/* helper to call method with 1 argument */
|
||||
Aml *aml_call0(const char *method)
|
||||
{
|
||||
Aml *var = aml_alloc();
|
||||
build_append_namestring(var->buf, "%s", method);
|
||||
return var;
|
||||
}
|
||||
|
||||
/* helper to call method with 1 argument */
|
||||
Aml *aml_call1(const char *method, Aml *arg1)
|
||||
{
|
||||
|
@ -236,6 +236,7 @@ Aml *aml_increment(Aml *arg);
|
||||
Aml *aml_decrement(Aml *arg);
|
||||
Aml *aml_index(Aml *arg1, Aml *idx);
|
||||
Aml *aml_notify(Aml *arg1, Aml *arg2);
|
||||
Aml *aml_call0(const char *method);
|
||||
Aml *aml_call1(const char *method, Aml *arg1);
|
||||
Aml *aml_call2(const char *method, Aml *arg1, Aml *arg2);
|
||||
Aml *aml_call3(const char *method, Aml *arg1, Aml *arg2, Aml *arg3);
|
||||
|
Loading…
Reference in New Issue
Block a user