summaryrefslogtreecommitdiffstats
path: root/sys/dev/hea
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>1999-08-21 06:24:40 +0000
committermsmith <msmith@FreeBSD.org>1999-08-21 06:24:40 +0000
commitb51f157bff8b959d943b0836a1c57f065b9318d5 (patch)
treee447ab34080a4d202ed41db3476df31ef1f56a50 /sys/dev/hea
parenta753b272ec1066c690e1ba83c8780af55e3a6c78 (diff)
downloadFreeBSD-src-b51f157bff8b959d943b0836a1c57f065b9318d5.zip
FreeBSD-src-b51f157bff8b959d943b0836a1c57f065b9318d5.tar.gz
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
Diffstat (limited to 'sys/dev/hea')
-rw-r--r--sys/dev/hea/eni.c14
1 files changed, 8 insertions, 6 deletions
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 <dev/hea/eni_var.h>
#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 */
OpenPOWER on IntegriCloud