arch/x86/acpigen: refactor calls to acpigen_write_register

All of the callers to acpigen_write_register() also make calls to
acpigen_write_resourcetemplate_[header|footer](). This change introduces
acpigen_write_register_resource() to unify all of those trio of calls
into one.  I also made the input parameter const.

Change-Id: I10b336acf9f03c423bee9dc38955b1617e11c025
Signed-off-by: Matt Delco <>
Reviewed-by: Furquan Shaikh <>
Reviewed-by: Philipp Deppenwiese <>
Reviewed-by: Paul Menzel <>
Reviewed-by: Duncan Laurie <>
Tested-by: build bot (Jenkins) <>
2 files changed