acpi_tables: aml: Implement Aml::append_aml_bytes() for Acquire

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2021-11-03 14:29:05 +00:00
parent b1d4bcf952
commit 9256c41173

View File

@ -908,12 +908,11 @@ impl Acquire {
} }
impl Aml for Acquire { impl Aml for Acquire {
fn to_aml_bytes(&self) -> Vec<u8> { fn append_aml_bytes(&self, bytes: &mut Vec<u8>) {
let mut bytes = vec![0x5b]; /* ExtOpPrefix */ bytes.push(0x5b); /* ExtOpPrefix */
bytes.push(0x23); /* AcquireOp */ 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.extend_from_slice(&self.timeout.to_le_bytes());
bytes
} }
} }