summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-03-27 23:26:19 +0300
committerTom Rini <trini@konsulko.com>2022-04-19 00:53:56 +0300
commit092d5c2a83b730844aeaa5ac300ddc7f13a75f49 (patch)
treea1eb7b69290ad103c95dc2688dfd227a1eaa45d3 /include
parent0c6be933ffeb991c1b9b70bce9cf9e9cdb92c9ed (diff)
downloadu-boot-092d5c2a83b730844aeaa5ac300ddc7f13a75f49.tar.xz
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')
-rw-r--r--include/dm/device-internal.h6
-rw-r--r--include/dm/device.h2
-rw-r--r--include/dm/devres.h4
3 files changed, 6 insertions, 6 deletions
diff --git a/include/dm/device-internal.h b/include/dm/device-internal.h
index e24b033640..94844d30d8 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)
{
diff --git a/include/dm/device.h b/include/dm/device.h
index cb52a0997c..3d8961f9ac 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -184,7 +184,7 @@ struct udevice {
#if CONFIG_IS_ENABLED(OF_REAL)
ofnode node_;
#endif
-#ifdef CONFIG_DEVRES
+#if CONFIG_IS_ENABLED(DEVRES)
struct list_head devres_head;
#endif
#if CONFIG_IS_ENABLED(DM_DMA)
diff --git a/include/dm/devres.h b/include/dm/devres.h
index 0ab277ec38..697534aa5b 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)
{