Module Name: src Committed By: dyoung Date: Sun Dec 6 23:17:09 UTC 2009
Modified Files: src/sys/dev/ic: dp8390.c Log Message: Simplify device-activation hooks. To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/dev/ic/dp8390.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ic/dp8390.c diff -u src/sys/dev/ic/dp8390.c:1.71 src/sys/dev/ic/dp8390.c:1.72 --- src/sys/dev/ic/dp8390.c:1.71 Tue May 12 14:25:17 2009 +++ src/sys/dev/ic/dp8390.c Sun Dec 6 23:17:09 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: dp8390.c,v 1.71 2009/05/12 14:25:17 cegger Exp $ */ +/* $NetBSD: dp8390.c,v 1.72 2009/12/06 23:17:09 dyoung Exp $ */ /* * Device driver for National Semiconductor DS8390/WD83C690 based ethernet @@ -14,7 +14,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dp8390.c,v 1.71 2009/05/12 14:25:17 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dp8390.c,v 1.72 2009/12/06 23:17:09 dyoung Exp $"); #include "opt_ipkdb.h" #include "opt_inet.h" @@ -1247,21 +1247,15 @@ int dp8390_activate(device_t self, enum devact act) { - struct dp8390_softc *sc = (struct dp8390_softc *)self; - int rv = 0, s; + struct dp8390_softc *sc = device_private(self); - s = splnet(); switch (act) { - case DVACT_ACTIVATE: - rv = EOPNOTSUPP; - break; - case DVACT_DEACTIVATE: if_deactivate(&sc->sc_ec.ec_if); - break; + return 0; + default: + return EOPNOTSUPP; } - splx(s); - return (rv); } int