Module Name:    src
Committed By:   dyoung
Date:           Tue Dec  1 01:05:23 UTC 2009

Modified Files:
        src/sys/dev/ic: cs89x0.c

Log Message:
Simplify the device activation routine.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/ic/cs89x0.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/cs89x0.c
diff -u src/sys/dev/ic/cs89x0.c:1.28 src/sys/dev/ic/cs89x0.c:1.29
--- src/sys/dev/ic/cs89x0.c:1.28	Tue Sep 22 16:44:08 2009
+++ src/sys/dev/ic/cs89x0.c	Tue Dec  1 01:05:23 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cs89x0.c,v 1.28 2009/09/22 16:44:08 tsutsui Exp $	*/
+/*	$NetBSD: cs89x0.c,v 1.29 2009/12/01 01:05:23 dyoung Exp $	*/
 
 /*
  * Copyright (c) 2004 Christopher Gilbert
@@ -212,7 +212,7 @@
 */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cs89x0.c,v 1.28 2009/09/22 16:44:08 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cs89x0.c,v 1.29 2009/12/01 01:05:23 dyoung Exp $");
 
 #include "opt_inet.h"
 
@@ -2198,19 +2198,12 @@
 cs_activate(device_t self, enum devact act)
 {
 	struct cs_softc *sc = device_private(self);
-	int s, error = 0;
 
-	s = splnet();
 	switch (act) {
-	case DVACT_ACTIVATE:
-		error = EOPNOTSUPP;
-		break;
-
 	case DVACT_DEACTIVATE:
 		if_deactivate(&sc->sc_ethercom.ec_if);
-		break;
+		return 0;
+	default:
+		return EOPNOTSUPP;
 	}
-	splx(s);
-
-	return error;
 }

Reply via email to