[PATCH 06/14] event: Export event_type_name()

Simon Glass sjg at chromium.org
Tue Aug 22 05:16:53 CEST 2023


Export this function so it can be used with initcall debugging.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 common/event.c  | 2 +-
 include/event.h | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/common/event.c b/common/event.c
index 7e2590eb0400..55f6932ef62c 100644
--- a/common/event.c
+++ b/common/event.c
@@ -49,7 +49,7 @@ const char *const type_name[] = {
 _Static_assert(ARRAY_SIZE(type_name) == EVT_COUNT, "event type_name size");
 #endif
 
-static const char *event_type_name(enum event_t type)
+const char *event_type_name(enum event_t type)
 {
 #if CONFIG_IS_ENABLED(EVENT_DEBUG)
 	return type_name[type];
diff --git a/include/event.h b/include/event.h
index 0e3222c2e243..062b5847897e 100644
--- a/include/event.h
+++ b/include/event.h
@@ -230,6 +230,14 @@ void event_show_spy_list(void);
  */
 int event_manual_reloc(void);
 
+/**
+ * event_type_name() - Get the name of an event type
+ *
+ * @type: Type to check
+ * Return: Name of event, or "(unknown)" if not known
+ */
+const char *event_type_name(enum event_t type);
+
 /**
  * event_notify() - notify spies about an event
  *
-- 
2.42.0.rc1.204.g551eb34607-goog



More information about the U-Boot mailing list