summaryrefslogtreecommitdiff
path: root/gxp-debug-dump.h
diff options
context:
space:
mode:
Diffstat (limited to 'gxp-debug-dump.h')
-rw-r--r--gxp-debug-dump.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/gxp-debug-dump.h b/gxp-debug-dump.h
index 1cf9219..aeb8229 100644
--- a/gxp-debug-dump.h
+++ b/gxp-debug-dump.h
@@ -12,13 +12,16 @@
#include <linux/types.h>
#include <linux/workqueue.h>
-#if IS_ENABLED(CONFIG_GXP_TEST) || IS_ENABLED(CONFIG_SUBSYSTEM_COREDUMP)
-#include <linux/platform_data/sscoredump.h>
-#endif
-
#include "gxp-dma.h"
#include "gxp-internal.h"
+#define HAS_COREDUMP \
+ (IS_ENABLED(CONFIG_GXP_TEST) || IS_ENABLED(CONFIG_SUBSYSTEM_COREDUMP))
+
+#if HAS_COREDUMP
+#include <linux/platform_data/sscoredump.h>
+#endif
+
#define GXP_NUM_COMMON_SEGMENTS 2
#define GXP_NUM_CORE_SEGMENTS 8
#define GXP_NUM_BUFFER_MAPPINGS 32
@@ -188,7 +191,7 @@ struct gxp_debug_dump_manager {
* time
*/
struct mutex debug_dump_lock;
-#if IS_ENABLED(CONFIG_GXP_TEST) || IS_ENABLED(CONFIG_SUBSYSTEM_COREDUMP)
+#if HAS_COREDUMP
struct sscd_segment segs[GXP_NUM_CORES][GXP_NUM_SEGMENTS_PER_CORE];
#endif
};