From b51f157bff8b959d943b0836a1c57f065b9318d5 Mon Sep 17 00:00:00 2001 From: msmith Date: Sat, 21 Aug 1999 06:24:40 +0000 Subject: Implement a new generic mechanism for attaching handler functions to events, in order to pave the way for removing a number of the ad-hoc implementations currently in use. Retire the at_shutdown family of functions and replace them with new event handler lists. Rework kern_shutdown.c to take greater advantage of the use of event handlers. Reviewed by: green --- sys/dev/hea/eni.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'sys/dev/hea') diff --git a/sys/dev/hea/eni.c b/sys/dev/hea/eni.c index f6f1549..7077680 100644 --- a/sys/dev/hea/eni.c +++ b/sys/dev/hea/eni.c @@ -23,7 +23,7 @@ * Copies of this Software may be made, however, the above copyright * notice must be reproduced on all copies. * - * @(#) $Id: eni.c,v 1.7 1999/05/09 17:07:27 peter Exp $ + * @(#) $Id: eni.c,v 1.8 1999/05/10 22:53:41 mks Exp $ * */ @@ -42,7 +42,7 @@ #include #ifndef lint -__RCSID("@(#) $Id: eni.c,v 1.7 1999/05/09 17:07:27 peter Exp $"); +__RCSID("@(#) $Id: eni.c,v 1.8 1999/05/10 22:53:41 mks Exp $"); #endif /* @@ -57,7 +57,7 @@ static void eni_read_seeprom __P((Eni_unit *)); #if BSD < 199506 static int eni_pci_shutdown __P((struct kern_devconf *, int)); #else -static void eni_pci_shutdown __P((int, void *)); +static void eni_pci_shutdown __P((void *, int)); #endif static void eni_pci_reset __P((Eni_unit *)); #endif /* __FreeBSD__ */ @@ -549,7 +549,9 @@ eni_pci_attach ( pcici_t config_id, int unit ) /* * Add hook to out shutdown function */ - at_shutdown ( (bootlist_fn)eni_pci_shutdown, eup, SHUTDOWN_POST_SYNC ); + EVENTHANDLER_REGISTER(shutdown_post_sync, eni_pci_shutdown, eup, + SHUTDOWN_PRI_DEFAULT); + #endif /* @@ -654,9 +656,9 @@ eni_pci_shutdown ( kdc, force ) * */ static void -eni_pci_shutdown ( howto, eup ) - int howto; +eni_pci_shutdown ( eup, howto ) void *eup; + int howto; { /* Do device reset */ -- cgit v1.1