]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mmc: pci_mmc.c should build with ACPIGEN=n
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 12 Jun 2022 12:53:48 +0000 (12:53 +0000)
committerJaehoon Chung <jh80.chung@samsung.com>
Wed, 27 Jul 2022 06:19:42 +0000 (15:19 +0900)
sandbox_defconfig builds the PCI MMC driver. It should be possible to
build the sandbox without ACPI support.

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

Fixes: dba7ee419d9d ("acpi: mmc: Generate ACPI info for the PCI SD Card")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
drivers/mmc/pci_mmc.c

index cba2ea8cf3ae84115567785bbf97b48560ceea0a..9fb7044029301fe78610a9993b8ff150f27fb4fb 100644 (file)
@@ -86,6 +86,7 @@ static int pci_mmc_bind(struct udevice *dev)
        return sdhci_bind(dev, &plat->mmc, &plat->cfg);
 }
 
+__maybe_unused
 static int pci_mmc_acpi_fill_ssdt(const struct udevice *dev,
                                  struct acpi_ctx *ctx)
 {
@@ -138,7 +139,9 @@ static int pci_mmc_acpi_fill_ssdt(const struct udevice *dev,
 }
 
 struct acpi_ops pci_mmc_acpi_ops = {
+#ifdef CONFIG_ACPIGEN
        .fill_ssdt      = pci_mmc_acpi_fill_ssdt,
+#endif
 };
 
 static const struct udevice_id pci_mmc_match[] = {