aboutsummaryrefslogtreecommitdiff
path: root/include/dm/device-internal.h
diff options
context:
space:
mode:
authorSimon Glass2022-03-27 14:26:19 -0600
committerTom Rini2022-04-18 17:53:56 -0400
commit092d5c2a83b730844aeaa5ac300ddc7f13a75f49 (patch)
treea1eb7b69290ad103c95dc2688dfd227a1eaa45d3 /include/dm/device-internal.h
parent0c6be933ffeb991c1b9b70bce9cf9e9cdb92c9ed (diff)
dm: core: Allow devres to be disabled in SPL
At present if devres is enabled in U-Boot proper it is enabled in SPL. We don't normally want it there, so disable it. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Angus Ainslie <angus@akkea.ca>
Diffstat (limited to 'include/dm/device-internal.h')
-rw-r--r--include/dm/device-internal.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/dm/device-internal.h b/include/dm/device-internal.h
index e24b0336409..94844d30d85 100644
--- a/include/dm/device-internal.h
+++ b/include/dm/device-internal.h
@@ -397,7 +397,7 @@ fdt_addr_t simple_bus_translate(struct udevice *dev, fdt_addr_t addr);
#define DM_UCLASS_ROOT_S_NON_CONST (((gd_t *)gd)->uclass_root_s)
/* device resource management */
-#ifdef CONFIG_DEVRES
+#if CONFIG_IS_ENABLED(DEVRES)
/**
* devres_release_probe - Release managed resources allocated after probing
@@ -417,7 +417,7 @@ void devres_release_probe(struct udevice *dev);
*/
void devres_release_all(struct udevice *dev);
-#else /* ! CONFIG_DEVRES */
+#else /* ! DEVRES */
static inline void devres_release_probe(struct udevice *dev)
{
@@ -427,7 +427,7 @@ static inline void devres_release_all(struct udevice *dev)
{
}
-#endif /* ! CONFIG_DEVRES */
+#endif /* DEVRES */
static inline int device_notify(const struct udevice *dev, enum event_t type)
{