summaryrefslogtreecommitdiff
path: root/src/drivers/lenovo
diff options
context:
space:
mode:
authorVladimir Serbinenko <phcoder@gmail.com>2014-11-05 21:29:45 +0100
committerVladimir Serbinenko <phcoder@gmail.com>2014-11-19 19:51:30 +0100
commit663be6e9f2773c98c9850b7e2797490b5f6caf8b (patch)
tree0c78c96ba01931a91518e48a9845c1f6558d5c2b /src/drivers/lenovo
parent80fb8edaea44483ed9fa28bfe060734d771150aa (diff)
acpigen: Add and use acpigen_write_device.
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: I2c33fa403832eb1cfadfbf8d9adef5b63fb9cb24 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/7348 Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/drivers/lenovo')
-rw-r--r--src/drivers/lenovo/wacom.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/drivers/lenovo/wacom.c b/src/drivers/lenovo/wacom.c
index 2f73a6d8e0..ce49535cc3 100644
--- a/src/drivers/lenovo/wacom.c
+++ b/src/drivers/lenovo/wacom.c
@@ -98,11 +98,7 @@ drivers_lenovo_serial_ports_ssdt_generate(const char *scope,
acpigen_write_scope(scope);
if (drivers_lenovo_is_wacom_present()) {
- /* Device op. */
- acpigen_emit_byte(0x5b);
- acpigen_emit_byte(0x82);
- acpigen_write_len_f();
- acpigen_emit_namestring("DTR");
+ acpigen_write_device("DTR");
acpigen_write_name("_HID");
acpigen_emit_eisaid("WACF004");
@@ -125,11 +121,7 @@ drivers_lenovo_serial_ports_ssdt_generate(const char *scope,
}
if (have_dock_serial) {
- /* Device op. */
- acpigen_emit_byte(0x5b);
- acpigen_emit_byte(0x82);
- acpigen_write_len_f();
- acpigen_emit_namestring("COMA");
+ acpigen_write_device("COMA");
acpigen_write_name("_HID");
acpigen_emit_eisaid("PNP0501");