[Concept,v2,06/22] event: Add a dummy function for event_notify()

Message ID 20250819185900.835939-7-sjg@u-boot.org
State New
Headers
Series efi: Improvements for the EFI app on ARM |

Commit Message

Simon Glass Aug. 19, 2025, 6:58 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

When CONFIG_EVENT is disabled, we should not try to send an event. This
is already handled for events without parameters, so handle it for
events that do have parameters, too.

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

(no changes since v1)

 include/event.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
  

Patch

diff --git a/include/event.h b/include/event.h
index 67b5bdd8a8b..a68be9fc1e8 100644
--- a/include/event.h
+++ b/include/event.h
@@ -402,6 +402,7 @@  void event_show_spy_list(void);
  */
 const char *event_type_name(enum event_t type);
 
+#if CONFIG_IS_ENABLED(EVENT)
 /**
  * event_notify() - notify spies about an event
  *
@@ -416,7 +417,6 @@  const char *event_type_name(enum event_t type);
  */
 int event_notify(enum event_t type, void *data, int size);
 
-#if CONFIG_IS_ENABLED(EVENT)
 /**
  * event_notify_null() - notify spies about an event
  *
@@ -431,6 +431,11 @@  static inline int event_notify_null(enum event_t type)
 {
 	return 0;
 }
+
+static inline int event_notify(enum event_t type, void *data, int size)
+{
+	return 0;
+}
 #endif
 
 #if CONFIG_IS_ENABLED(EVENT_DYNAMIC)