From 2849d28d96718c6d2c0c9513745a45a02404bc91 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 1 May 2021 23:37:35 -0400 Subject: sim: hw: localize init callback Now that we don't need to hardcode the module init list in a single place, move the hw init logic out to the sim-hw file. --- sim/common/sim-hw.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sim/common/sim-hw.c') diff --git a/sim/common/sim-hw.c b/sim/common/sim-hw.c index 11d3abd..984817f 100644 --- a/sim/common/sim-hw.c +++ b/sim/common/sim-hw.c @@ -288,8 +288,12 @@ hw_option_handler (struct sim_state *sd, sim_cpu *cpu, int opt, static MODULE_INIT_FN sim_hw_init; static MODULE_UNINSTALL_FN sim_hw_uninstall; +/* Provide a prototype to silence -Wmissing-prototypes. */ +SIM_RC sim_install_hw (struct sim_state *sd); + +/* Establish this object. */ SIM_RC -sim_hw_install (struct sim_state *sd) +sim_install_hw (struct sim_state *sd) { SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); sim_add_option_table (sd, NULL, hw_options); -- cgit v1.1