From 242a7f7ab4f29a3dbed693d3830d10dfabda96a1 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 Interrupt Signed-off-by: Rob Bradford --- acpi_tables/src/aml.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/acpi_tables/src/aml.rs b/acpi_tables/src/aml.rs index cba4f8b4b..21402081c 100644 --- a/acpi_tables/src/aml.rs +++ b/acpi_tables/src/aml.rs @@ -531,8 +531,8 @@ impl Interrupt { } impl Aml for Interrupt { - fn to_aml_bytes(&self) -> Vec { - let mut bytes = vec![0x89]; /* Extended IRQ Descriptor */ + fn append_aml_bytes(&self, bytes: &mut Vec) { + bytes.push(0x89); /* Extended IRQ Descriptor */ bytes.append(&mut 6u16.to_le_bytes().to_vec()); let flags = (self.shared as u8) << 3 | (self.active_low as u8) << 2 @@ -541,8 +541,6 @@ impl Aml for Interrupt { bytes.push(flags); bytes.push(1u8); /* count */ bytes.append(&mut self.number.to_le_bytes().to_vec()); - - bytes } }