From 38e670b0d5e7e0714a9c2866e6cdeedbe4ddfb9f Mon Sep 17 00:00:00 2001 From: Troy Kisky <troy.kisky@boundarydevices.com> Date: Wed, 14 Aug 2019 11:15:00 -0700 Subject: [PATCH] dm: device.h: check CONFIG_IS_ENABLED(DM) before using devres functions Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> --- include/dm/device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/dm/device.h b/include/dm/device.h index 49078bc6b36..b07e252c3f3 100644 --- a/include/dm/device.h +++ b/include/dm/device.h @@ -628,7 +628,7 @@ int dm_scan_fdt_dev(struct udevice *dev); typedef void (*dr_release_t)(struct udevice *dev, void *res); typedef int (*dr_match_t)(struct udevice *dev, void *res, void *match_data); -#ifdef CONFIG_DEVRES +#if defined(CONFIG_DEVRES) && CONFIG_IS_ENABLED(DM) #ifdef CONFIG_DEBUG_DEVRES void *__devres_alloc(dr_release_t release, size_t size, gfp_t gfp, -- GitLab