diff mbox series

[1/1] sound: enable building DA7219 driver with ACPIGEN=n

Message ID 20220612131534.22617-1-xypron.glpk@gmx.de
State Accepted
Commit d1a03e6bbc4e025797af17168b4909b3b14a2590
Delegated to: Tom Rini
Headers show
Series [1/1] sound: enable building DA7219 driver with ACPIGEN=n | expand

Commit Message

Heinrich Schuchardt June 12, 2022, 1:15 p.m. UTC
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: 0324b7123e22 ("sound: Add an ACPI driver for Dialog Semicondutor da7219")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 drivers/sound/da7219.c | 3 +++
 1 file changed, 3 insertions(+)

--
2.36.1

Comments

Tom Rini July 8, 2022, 4:38 p.m. UTC | #1
On Sun, Jun 12, 2022 at 01:15:34PM +0000, Heinrich Schuchardt wrote:

> 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: 0324b7123e22 ("sound: Add an ACPI driver for Dialog Semicondutor da7219")
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

Applied to u-boot/next, thanks!
diff mbox series

Patch

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[] = {