snd: enable building max98357a driver with ACPIGEN=n

sandbox_defconfig builds the max98357a driver. It should be possible to
build the sandbox without ACPI support.

ACPI support in the max98357a driver is only needed when creating an ACPI
table. Fix building with ACPIGEN=n.

Fixes: 54bcca2973 ("sound: Add an ACPI driver for Maxim MAX98357ac")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
Heinrich Schuchardt 2022-06-12 13:13:05 +00:00 committed by Tom Rini
parent ebaa3d053e
commit 3ca32c806b

View file

@ -38,6 +38,7 @@ static int max98357a_of_to_plat(struct udevice *dev)
return 0; return 0;
} }
__maybe_unused
static int max98357a_acpi_fill_ssdt(const struct udevice *dev, static int max98357a_acpi_fill_ssdt(const struct udevice *dev,
struct acpi_ctx *ctx) struct acpi_ctx *ctx)
{ {
@ -137,10 +138,12 @@ static int max98357a_acpi_setup_nhlt(const struct udevice *dev,
#endif #endif
struct acpi_ops max98357a_acpi_ops = { struct acpi_ops max98357a_acpi_ops = {
#ifdef CONFIG_ACPIGEN
.fill_ssdt = max98357a_acpi_fill_ssdt, .fill_ssdt = max98357a_acpi_fill_ssdt,
#ifdef CONFIG_X86 #ifdef CONFIG_X86
.setup_nhlt = max98357a_acpi_setup_nhlt, .setup_nhlt = max98357a_acpi_setup_nhlt,
#endif #endif
#endif
}; };
static const struct audio_codec_ops max98357a_ops = { static const struct audio_codec_ops max98357a_ops = {