[rtems-libbsd commit] regulator: Disable FDT parts for non-FDT targets

Christian Mauderer christianm at rtems.org
Fri Apr 17 12:44:58 UTC 2020


Module:    rtems-libbsd
Branch:    5-freebsd-12
Commit:    318422720b7f554774f29fa692c236b8767ef4d5
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=318422720b7f554774f29fa692c236b8767ef4d5

Author:    Christian Mauderer <christian.mauderer at embedded-brains.de>
Date:      Fri Apr 17 09:08:18 2020 +0200

regulator: Disable FDT parts for non-FDT targets

---

 freebsd/sys/dev/extres/regulator/regulator.c | 2 ++
 freebsd/sys/dev/gpio/gpioregulator.c         | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/freebsd/sys/dev/extres/regulator/regulator.c b/freebsd/sys/dev/extres/regulator/regulator.c
index 4ad6e94..5af3a56 100644
--- a/freebsd/sys/dev/extres/regulator/regulator.c
+++ b/freebsd/sys/dev/extres/regulator/regulator.c
@@ -51,7 +51,9 @@ __FBSDID("$FreeBSD$");
 #endif
 #include <dev/extres/regulator/regulator.h>
 
+#if !defined(__rtems__) || defined(FDT)
 #include <rtems/bsd/local/regdev_if.h>
+#endif /* !__rtems__ || FDT */
 
 SYSCTL_NODE(_hw, OID_AUTO, regulator, CTLFLAG_RD, NULL, "Regulators");
 
diff --git a/freebsd/sys/dev/gpio/gpioregulator.c b/freebsd/sys/dev/gpio/gpioregulator.c
index 6d05e52..70e5b1d 100644
--- a/freebsd/sys/dev/gpio/gpioregulator.c
+++ b/freebsd/sys/dev/gpio/gpioregulator.c
@@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/module.h>
 #include <sys/gpio.h>
 
+#if !defined(__rtems__) || defined(FDT)
 #include <dev/ofw/ofw_bus.h>
 #include <dev/ofw/ofw_bus_subr.h>
 
@@ -348,3 +349,4 @@ static devclass_t gpioregulator_devclass;
 EARLY_DRIVER_MODULE(gpioregulator, simplebus, gpioregulator_driver,
     gpioregulator_devclass, 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LAST);
 MODULE_VERSION(gpioregulator, 1);
+#endif /* !__rtems__ || FDT */



More information about the vc mailing list