From bdd5031ad2bd70cff6de1f16237dc3f1507c7a64 Mon Sep 17 00:00:00 2001 From: Zheng Bao Date: Tue, 26 Jan 2021 18:27:46 +0800 Subject: soc/amd/common: Only set write_acpi_tables if ACPI table is enabled In ./include/device/device.h, the struct device_operations is defined as below. ------------------------------------ #if CONFIG(HAVE_ACPI_TABLES) unsigned long (*write_acpi_tables)(const struct device *dev, unsigned long start, struct acpi_rsdp *rsdp); void (*acpi_fill_ssdt)(const struct device *dev); void (*acpi_inject_dsdt)(const struct device *dev); const char *(*acpi_name)(const struct device *dev); /* Returns the optional _HID (Hardware ID) */ const char *(*acpi_hid)(const struct device *dev); #endif ------------------------------------ So we also need to add the same #if in the C source. Change-Id: I488eceacb260ebe091495cdc3448c931cc4a1ae3 Signed-off-by: Zheng Bao Reviewed-on: https://review.coreboot.org/c/coreboot/+/49928 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held Reviewed-by: Marshall Dawson --- src/soc/amd/common/block/lpc/lpc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/soc/amd/common/block/lpc/lpc.c') diff --git a/src/soc/amd/common/block/lpc/lpc.c b/src/soc/amd/common/block/lpc/lpc.c index 8a7dc34c6c..0be5b740eb 100644 --- a/src/soc/amd/common/block/lpc/lpc.c +++ b/src/soc/amd/common/block/lpc/lpc.c @@ -322,7 +322,9 @@ static struct device_operations lpc_ops = { .read_resources = lpc_read_resources, .set_resources = lpc_set_resources, .enable_resources = lpc_enable_resources, +#if CONFIG(HAVE_ACPI_TABLES) .write_acpi_tables = southbridge_write_acpi_tables, +#endif .init = lpc_init, .scan_bus = scan_static_bus, .ops_pci = &pci_dev_ops_pci, -- cgit v1.2.3