Simplify activation hook. (sc_dying must die!)

This commit is contained in:
dyoung 2009-11-12 19:53:14 +00:00
parent 189c253b00
commit 8f3030b535
1 changed files with 5 additions and 10 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: moscom.c,v 1.2 2009/09/23 19:07:19 plunky Exp $ */
/* $NetBSD: moscom.c,v 1.3 2009/11/12 19:53:14 dyoung Exp $ */
/* $OpenBSD: moscom.c,v 1.11 2007/10/11 18:33:14 deraadt Exp $ */
/*
@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: moscom.c,v 1.2 2009/09/23 19:07:19 plunky Exp $");
__KERNEL_RCSID(0, "$NetBSD: moscom.c,v 1.3 2009/11/12 19:53:14 dyoung Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -300,19 +300,14 @@ int
moscom_activate(device_t self, enum devact act)
{
struct moscom_softc *sc = device_private(self);
int rv = 0;
switch (act) {
case DVACT_ACTIVATE:
return (EOPNOTSUPP);
case DVACT_DEACTIVATE:
if (sc->sc_subdev != NULL)
rv = config_deactivate(sc->sc_subdev);
sc->sc_dying = 1;
break;
return 0;
default:
return EOPNOTSUPP;
}
return (rv);
}
int