From 64c3edc237a5281e2210b3dd27868175f87b3973 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Thu, 27 Oct 2022 17:28:56 +0100 Subject: [PATCH] Allow the extres regulator code to build without FDT This allows drivers that use this to build in an ACPI only kernel. Sponsored by: The FreeBSD Foundation --- sys/conf/files | 4 ++-- sys/dev/extres/regulator/regulator.c | 2 ++ sys/dev/extres/regulator/regulator.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 5a74f1b1f1b..b77fd313954 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1741,8 +1741,8 @@ dev/extres/hwreset/hwreset_if.m optional hwreset fdt dev/extres/nvmem/nvmem.c optional nvmem fdt dev/extres/nvmem/nvmem_if.m optional nvmem fdt dev/extres/regulator/regdev_if.m optional regulator fdt -dev/extres/regulator/regnode_if.m optional regulator fdt -dev/extres/regulator/regulator.c optional regulator fdt +dev/extres/regulator/regnode_if.m optional regulator +dev/extres/regulator/regulator.c optional regulator dev/extres/regulator/regulator_bus.c optional regulator fdt dev/extres/regulator/regulator_fixed.c optional regulator fdt dev/extres/syscon/syscon.c optional syscon diff --git a/sys/dev/extres/regulator/regulator.c b/sys/dev/extres/regulator/regulator.c index eab79e9dfbc..f87dec3fafb 100644 --- a/sys/dev/extres/regulator/regulator.c +++ b/sys/dev/extres/regulator/regulator.c @@ -49,7 +49,9 @@ __FBSDID("$FreeBSD$"); #endif #include +#ifdef FDT #include "regdev_if.h" +#endif SYSCTL_NODE(_hw, OID_AUTO, regulator, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Regulators"); diff --git a/sys/dev/extres/regulator/regulator.h b/sys/dev/extres/regulator/regulator.h index 03a8fbe1f53..587d788d360 100644 --- a/sys/dev/extres/regulator/regulator.h +++ b/sys/dev/extres/regulator/regulator.h @@ -34,8 +34,8 @@ #include #ifdef FDT #include -#include "regnode_if.h" #endif +#include "regnode_if.h" SYSCTL_DECL(_hw_regulator);