From: Heinrich Schuchardt Date: Sun, 12 Jun 2022 13:15:34 +0000 (+0000) Subject: sound: enable building DA7219 driver with ACPIGEN=n X-Git-Tag: baikal/mips/sdk5.8.2~5^2~292^2~3^2~7 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=57faabfdc8c2535e6acc6f00d4bc488e9defc66e;p=uboot.git sound: enable building DA7219 driver with ACPIGEN=n sandbox_defconfig builds the DA7219 driver. It should be possible to build the sandbox without ACPI support. ACPI support in the DA7219 driver is only needed when creating an ACPI table. Fix building with ACPIGEN=n. Fixes: 96a487897af8 ("sound: Add an ACPI driver for Dialog Semicondutor da7219") Signed-off-by: Heinrich Schuchardt --- diff --git a/drivers/sound/da7219.c b/drivers/sound/da7219.c index 8d674bcb4f..c1edef4436 100644 --- a/drivers/sound/da7219.c +++ b/drivers/sound/da7219.c @@ -23,6 +23,7 @@ #define DA7219_ACPI_HID "DLGS7219" +__maybe_unused static int da7219_acpi_fill_ssdt(const struct udevice *dev, struct acpi_ctx *ctx) { @@ -171,10 +172,12 @@ static int da7219_acpi_setup_nhlt(const struct udevice *dev, #endif struct acpi_ops da7219_acpi_ops = { +#ifdef CONFIG_ACPIGEN .fill_ssdt = da7219_acpi_fill_ssdt, #ifdef CONFIG_X86 .setup_nhlt = da7219_acpi_setup_nhlt, #endif +#endif }; static const struct udevice_id da7219_ids[] = {