[coreboot-gerrit] Change in coreboot[master]: ec/acpi: Rework to reduce code duplication