summaryrefslogtreecommitdiff
path: root/include/dm/device-internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/dm/device-internal.h')
-rw-r--r--include/dm/device-internal.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/dm/device-internal.h b/include/dm/device-internal.h
index a2bf057..2cd2fe9 100644
--- a/include/dm/device-internal.h
+++ b/include/dm/device-internal.h
@@ -156,6 +156,8 @@ fdt_addr_t simple_bus_translate(struct udevice *dev, fdt_addr_t addr);
#define DM_UCLASS_ROOT_NON_CONST (((gd_t *)gd)->uclass_root)
/* device resource management */
+#ifdef CONFIG_DEVRES
+
/**
* devres_release_probe - Release managed resources allocated after probing
* @dev: Device to release resources for
@@ -174,4 +176,15 @@ void devres_release_probe(struct udevice *dev);
*/
void devres_release_all(struct udevice *dev);
+#else /* ! CONFIG_DEVRES */
+
+static inline void devres_release_probe(struct udevice *dev)
+{
+}
+
+static inline void devres_release_all(struct udevice *dev)
+{
+}
+
+#endif /* ! CONFIG_DEVRES */
#endif