From 9256c4117352d55859fc6a25215d23a89a3716a1 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Wed, 3 Nov 2021 14:29:05 +0000 Subject: [PATCH] acpi_tables: aml: Implement Aml::append_aml_bytes() for Acquire Signed-off-by: Rob Bradford --- acpi_tables/src/aml.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/acpi_tables/src/aml.rs b/acpi_tables/src/aml.rs index f1490d166..16b9b1bc2 100644 --- a/acpi_tables/src/aml.rs +++ b/acpi_tables/src/aml.rs @@ -908,12 +908,11 @@ impl Acquire { } impl Aml for Acquire { - fn to_aml_bytes(&self) -> Vec { - let mut bytes = vec![0x5b]; /* ExtOpPrefix */ + fn append_aml_bytes(&self, bytes: &mut Vec) { + bytes.push(0x5b); /* ExtOpPrefix */ bytes.push(0x23); /* AcquireOp */ - bytes.extend_from_slice(&self.mutex.to_aml_bytes()); + self.mutex.append_aml_bytes(bytes); bytes.extend_from_slice(&self.timeout.to_le_bytes()); - bytes } }