dm: fix DM_EVENT dependencies
CONFIG_DM_EVENT without CONFIG_EVENT is non-functional.
Let CONFIG_DM_EVENT depend on CONFIG_EVENT.
Remove superfluous stub in include/event.h.
Fixes: 5b896ed5856f ("event: Add events for device probe/remove")
Reported-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig
index 27d6578..9b9a714 100644
--- a/drivers/core/Kconfig
+++ b/drivers/core/Kconfig
@@ -89,8 +89,7 @@
config DM_EVENT
bool "Support events with driver model"
- depends on DM
- imply EVENT
+ depends on DM && EVENT
default y if SANDBOX
help
This enables support for generating events related to driver model
diff --git a/include/event.h b/include/event.h
index 62e72a7..7765f07 100644
--- a/include/event.h
+++ b/include/event.h
@@ -144,7 +144,6 @@
/** event_show_spy_list( - Show a list of event spies */
void event_show_spy_list(void);
-#if CONFIG_IS_ENABLED(EVENT)
/**
* event_notify() - notify spies about an event
*
@@ -159,6 +158,7 @@
*/
int event_notify(enum event_t type, void *data, int size);
+#if CONFIG_IS_ENABLED(EVENT)
/**
* event_notify_null() - notify spies about an event
*
@@ -169,11 +169,6 @@
*/
int event_notify_null(enum event_t type);
#else
-static inline int event_notify(enum event_t type, void *data, int size)
-{
- return 0;
-}
-
static inline int event_notify_null(enum event_t type)
{
return 0;