diff options
author | arr <arr@FreeBSD.org> | 2002-05-07 20:37:40 +0000 |
---|---|---|
committer | arr <arr@FreeBSD.org> | 2002-05-07 20:37:40 +0000 |
commit | e98eeb7929c0655badd5a4a4cbf643808da4c6c6 (patch) | |
tree | cc27b363d3047c5174fd76174431c99e57af50ce | |
parent | 3ee655b971be7dd2a3d9f6ec269360017932a3f7 (diff) | |
download | FreeBSD-src-e98eeb7929c0655badd5a4a4cbf643808da4c6c6.zip FreeBSD-src-e98eeb7929c0655badd5a4a4cbf643808da4c6c6.tar.gz |
- Use an array of init functions to be used in a for loop in our
initialization routine.
-rw-r--r-- | sys/netatm/atm_subr.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/netatm/atm_subr.c b/sys/netatm/atm_subr.c index 43d651d..556837bb 100644 --- a/sys/netatm/atm_subr.c +++ b/sys/netatm/atm_subr.c @@ -95,6 +95,13 @@ static struct atm_time atm_compactimer = {0, 0}; static uma_zone_t atm_stackq_zone; +static atm_init_fn atm_init_fns[] = { + &atm_sock_init, + &atm_cm_init, + &atm_aal5_init, + NULL +}; + /* * Initialize ATM kernel * @@ -112,6 +119,8 @@ static uma_zone_t atm_stackq_zone; void atm_initialize() { + u_int i; + /* * Never called from interrupts, so no locking needed */ @@ -141,10 +150,8 @@ atm_initialize() /* * Initialize subsystems */ - atm_sock_init(); - atm_cm_init(); - atm_aal5_init(); - + for (i = 0; i < sizeof(atm_init_fns) / sizeof(atm_init_fn); i++) + atm_init_fns[i](); /* * Prime the timer */ |