spl: Avoid an #ifdef when printing gd->malloc_ptr
Use an accessor in the header file to avoid this.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index f8fc87f..937fb12 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -588,6 +588,12 @@
#define gd_set_pci_ram_top(val)
#endif
+#if CONFIG_VAL(SYS_MALLOC_F_LEN)
+#define gd_malloc_ptr() gd->malloc_ptr
+#else
+#define gd_malloc_ptr() 0L
+#endif
+
/**
* enum gd_flags - global data flags
*