summaryrefslogtreecommitdiff
path: root/lib/lmb.c
diff options
context:
space:
mode:
authorAshok Reddy Soma <ashok.reddy.soma@xilinx.com>2022-07-07 11:45:36 +0300
committerMichal Simek <michal.simek@amd.com>2022-07-26 09:23:54 +0300
commit7c1860fce4e369bdcabc1f574feb6b9af19999a3 (patch)
tree969bcd71a7cc0a8768cec26b7c83a7858aaf3bc1 /lib/lmb.c
parentb09e462482b4b84f5d99986514db5fe8d10f4c2f (diff)
downloadu-boot-7c1860fce4e369bdcabc1f574feb6b9af19999a3.tar.xz
lmb: Fix lmb property's defination under struct lmb
Under struct lmb {} the lmb property's should be defined only if CONFIG_LMB_MEMORY_REGIONS is defined. Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/c24a2b1d6f5db4eb65393f6a77fae129b30b6233.1657183534.git.michal.simek@amd.com
Diffstat (limited to 'lib/lmb.c')
-rw-r--r--lib/lmb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/lmb.c b/lib/lmb.c
index f72996a424..f21fe672ae 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -108,7 +108,7 @@ void lmb_init(struct lmb *lmb)
#if IS_ENABLED(CONFIG_LMB_USE_MAX_REGIONS)
lmb->memory.max = CONFIG_LMB_MAX_REGIONS;
lmb->reserved.max = CONFIG_LMB_MAX_REGIONS;
-#else
+#elif IS_ENABLED(CONFIG_LMB_MEMORY_REGIONS)
lmb->memory.max = CONFIG_LMB_MEMORY_REGIONS;
lmb->reserved.max = CONFIG_LMB_RESERVED_REGIONS;
lmb->memory.region = lmb->memory_regions;