aboutsummaryrefslogtreecommitdiff
path: root/common/debug.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2022-01-07 20:50:16 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2022-01-07 20:50:16 +0200
commitacc26f85f32c68a51e5cc7b613cd0ea0b0630505 (patch)
tree90d68a8292360f0796509f1febc7b66b0a53f4aa /common/debug.c
parent8d90fb3e4a5d02df75584016563ef84901967b9f (diff)
downloadkmi-acc26f85f32c68a51e5cc7b613cd0ea0b0630505.tar.gz
kmi-acc26f85f32c68a51e5cc7b613cd0ea0b0630505.zip
Use #if defined(...) when not guard clause
Diffstat (limited to 'common/debug.c')
-rw-r--r--common/debug.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/debug.c b/common/debug.c
index aab5abc..330a3ed 100644
--- a/common/debug.c
+++ b/common/debug.c
@@ -7,13 +7,13 @@
#include <libfdt.h>
#include <stdarg.h>
-#ifdef DEBUG
+#if defined(DEBUG)
static struct dbg_info {
pm_t dbg_ptr;
enum serial_dev dev;
} dbg_info = (struct dbg_info){0};
-void init_dbg(void *fdt)
+void init_dbg(const void *fdt)
{
dbg_info = dbg_from_fdt(fdt);
}
@@ -88,7 +88,7 @@ static enum serial_dev __serial_dev_enum(const char *dev_name)
return -1;
}
-struct dbg_info dbg_from_fdt(void *fdt)
+struct dbg_info dbg_from_fdt(const void *fdt)
{
int chosen_offset = fdt_path_offset(fdt, "/chosen");
const char *stdout = fdt_getprop(fdt, chosen_offset, "stdout-path", NULL);