aboutsummaryrefslogtreecommitdiff
path: root/include/dm/devres.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/devres.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/devres.h')
-rw-r--r--include/dm/devres.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/dm/devres.h b/include/dm/devres.h
index 0ab277ec38e..697534aa5be 100644
--- a/include/dm/devres.h
+++ b/include/dm/devres.h
@@ -30,7 +30,7 @@ struct devres_stats {
int total_size;
};
-#ifdef CONFIG_DEVRES
+#if CONFIG_IS_ENABLED(DEVRES)
#ifdef CONFIG_DEBUG_DEVRES
void *__devres_alloc(dr_release_t release, size_t size, gfp_t gfp,
@@ -207,7 +207,7 @@ void devm_kfree(struct udevice *dev, void *ptr);
/* Get basic stats on allocations */
void devres_get_stats(const struct udevice *dev, struct devres_stats *stats);
-#else /* ! CONFIG_DEVRES */
+#else /* ! DEVRES */
static inline void *devres_alloc(dr_release_t release, size_t size, gfp_t gfp)
{