From 61fcb7e9654634cfe0c8a7bf56581fb54d943bd8 Mon Sep 17 00:00:00 2001 From: Jakub Czapiga Date: Fri, 19 Feb 2021 11:44:22 +0100 Subject: acpi/acpigen.h: Add more intuitive AML package closing functions Until now every AML package had to be closed using acpigen_pop_len(). This commit introduces set of package closing functions corresponding with their opening function names. For example acpigen_write_if() opens if-statement package, acpigen_write_if_end() closes it. Now acpigen_write_else() closes previously opened acpigen_write_if(), so acpigen_pop_len() is not required before it. Signed-off-by: Jakub Czapiga Change-Id: Icfdc3804cd93bde049cd11dec98758b3a639eafd Reviewed-on: https://review.coreboot.org/c/coreboot/+/50910 Tested-by: build bot (Jenkins) Reviewed-by: Lance Zhao Reviewed-by: Angel Pons --- src/superio/nuvoton/npcd378/superio.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/superio/nuvoton') diff --git a/src/superio/nuvoton/npcd378/superio.c b/src/superio/nuvoton/npcd378/superio.c index b7f98af66b..801592d234 100644 --- a/src/superio/nuvoton/npcd378/superio.c +++ b/src/superio/nuvoton/npcd378/superio.c @@ -248,7 +248,6 @@ static void npcd378_ssdt_pwr(const struct device *dev) acpigen_write_integer(0xE8); acpigen_emit_namestring("^GPE2"); - acpigen_pop_len(); /* Pop If */ acpigen_write_else(); acpigen_emit_byte(AND_OP); @@ -268,7 +267,6 @@ static void npcd378_ssdt_pwr(const struct device *dev) acpigen_write_integer(0x10); acpigen_emit_namestring("^GPE2"); - acpigen_pop_len(); /* Pop If */ acpigen_write_else(); acpigen_emit_byte(AND_OP); -- cgit v1.2.3