Module Name: src Committed By: dyoung Date: Thu Nov 12 19:53:15 UTC 2009
Modified Files: src/sys/dev/usb: moscom.c Log Message: Simplify activation hook. (sc_dying must die!) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/usb/moscom.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/usb/moscom.c diff -u src/sys/dev/usb/moscom.c:1.2 src/sys/dev/usb/moscom.c:1.3 --- src/sys/dev/usb/moscom.c:1.2 Wed Sep 23 19:07:19 2009 +++ src/sys/dev/usb/moscom.c Thu Nov 12 19:53:14 2009 @@ -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 @@ 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