From 42fdcebf859f93139d58defd5abef44dedb9b17a Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 4 Mar 2022 08:43:04 -0700 Subject: event: Convert misc_init_f() to use events This hook can be implmented using events, for the three boards that actually use it. Add the event type and event handlers. Drop CONFIG_MISC_INIT_F since we can just use CONFIG_EVENT to control this. Since sandbox always enables CONFIG_EVENT, we can drop the defconfig lines there too. Signed-off-by: Simon Glass --- arch/sandbox/cpu/start.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'arch/sandbox') diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c index 12aace9a20..0f5a87309d 100644 --- a/arch/sandbox/cpu/start.c +++ b/arch/sandbox/cpu/start.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -119,10 +120,11 @@ int sandbox_early_getopt_check(void) os_exit(0); } -int misc_init_f(void) +static int sandbox_misc_init_f(void *ctx, struct event *event) { return sandbox_early_getopt_check(); } +EVENT_SPY(EVT_MISC_INIT_F, sandbox_misc_init_f); static int sandbox_cmdline_cb_help(struct sandbox_state *state, const char *arg) { -- cgit v1.2.1