diff options
author | Vladimir Serbinenko <phcoder@gmail.com> | 2014-11-05 10:28:28 +0100 |
---|---|---|
committer | Vladimir Serbinenko <phcoder@gmail.com> | 2014-11-19 19:50:51 +0100 |
commit | 80fb8edaea44483ed9fa28bfe060734d771150aa (patch) | |
tree | 9abeeefa3bc276dd6fef42d6f3fb29e7d3d1bd0e /src/drivers/lenovo | |
parent | f9cdb486d182668e053ca16f115cbc49066d7768 (diff) | |
download | coreboot-80fb8edaea44483ed9fa28bfe060734d771150aa.tar.xz |
acpigen: Add and use acpigen_write_method.
The sequence of bytes to create a method is used several times in codebase.
Put it into a function with logical arguments rather than duplicating magic
bytes everywhere.
Change-Id: I0e55d8dc7d5e8e92a521c7a83117c470d0614008
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/7347
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Diffstat (limited to 'src/drivers/lenovo')
-rw-r--r-- | src/drivers/lenovo/wacom.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/drivers/lenovo/wacom.c b/src/drivers/lenovo/wacom.c index 4a79e9a913..2f73a6d8e0 100644 --- a/src/drivers/lenovo/wacom.c +++ b/src/drivers/lenovo/wacom.c @@ -115,12 +115,7 @@ drivers_lenovo_serial_ports_ssdt_generate(const char *scope, acpigen_write_resourcetemplate_footer(reslen); - /* method op */ - acpigen_emit_byte(0x14); - acpigen_write_len_f(); - acpigen_emit_namestring("_STA"); - /* no fnarg */ - acpigen_emit_byte(0x00); + acpigen_write_method("_STA", 0); /* return */ acpigen_emit_byte(0xa4); acpigen_write_byte(0xf); @@ -151,11 +146,7 @@ drivers_lenovo_serial_ports_ssdt_generate(const char *scope, acpigen_write_resourcetemplate_footer(reslen); /* method op */ - acpigen_emit_byte(0x14); - acpigen_write_len_f(); - acpigen_emit_namestring("_STA"); - /* no fnarg */ - acpigen_emit_byte(0x00); + acpigen_write_method("_STA", 0); /* return */ acpigen_emit_byte(0xa4); acpigen_write_byte(0xf); |