acpi/acpi_pm: Fix compilation without SMBIOS

smbios_mainboard_enclosure_type() is not linked when SMBIOS
is disabled. Fixes a linker error when the user disabled SMBIOS
table generation in Kconfig.

Change-Id: Ic3e70c658d01a839eb37f0862f31ee9f65a84300
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89280
Reviewed-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Patrick Rudolph 2025-09-20 15:00:06 +02:00 committed by Matt DeVillier
commit 7acc99c3d2

View file

@ -21,6 +21,9 @@ void __weak mainboard_suspend_resume(void)
/* Default mapping to ACPI FADT preferred_pm_profile field. */
uint8_t acpi_get_preferred_pm_profile(void)
{
if (!CONFIG(GENERATE_SMBIOS_TABLES))
return PM_UNSPECIFIED;
switch (smbios_mainboard_enclosure_type()) {
case SMBIOS_ENCLOSURE_LAPTOP:
case SMBIOS_ENCLOSURE_CONVERTIBLE: