Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ieee1394 Simplify device-activation hook.



details:   https://anonhg.NetBSD.org/src/rev/76d119f6ca3a
branches:  trunk
changeset: 749740:76d119f6ca3a
user:      dyoung <dyoung%NetBSD.org@localhost>
date:      Sun Dec 06 22:56:56 2009 +0000

description:
Simplify device-activation hook.

diffstat:

 sys/dev/ieee1394/if_fwip.c |  19 +++++--------------
 1 files changed, 5 insertions(+), 14 deletions(-)

diffs (51 lines):

diff -r d9a0a30525ce -r 76d119f6ca3a sys/dev/ieee1394/if_fwip.c
--- a/sys/dev/ieee1394/if_fwip.c        Sun Dec 06 22:51:25 2009 +0000
+++ b/sys/dev/ieee1394/if_fwip.c        Sun Dec 06 22:56:56 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_fwip.c,v 1.19 2009/05/12 12:16:55 cegger Exp $      */
+/*     $NetBSD: if_fwip.c,v 1.20 2009/12/06 22:56:56 dyoung Exp $      */
 /*-
  * Copyright (c) 2004
  *     Doug Rabson
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_fwip.c,v 1.19 2009/05/12 12:16:55 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_fwip.c,v 1.20 2009/12/06 22:56:56 dyoung Exp $");
 
 #ifdef HAVE_KERNEL_OPTION_HEADERS
 #include "opt_device_polling.h"
@@ -395,29 +395,20 @@
        return 0;
 }
 
-#if defined(__NetBSD__)
 int
 fwipactivate(device_t self, enum devact act)
 {
        struct fwip_softc *fwip = device_private(self);
-       int s, error = 0;
 
-       s = splfwnet();
        switch (act) {
-       case DVACT_ACTIVATE:
-               error = EOPNOTSUPP;
-               break;
-
        case DVACT_DEACTIVATE:
                if_deactivate(fwip->fw_softc.fwip_ifp);
-                       break;
+               return 0;
+       default:
+               return EOPNOTSUPP;
        }
-       splx(s);
-
-       return (error);
 }
 
-#endif
 IF_INIT(fwip)
 {
        IF_INIT_START(fwip, fwip, ifp);



Home | Main Index | Thread Index | Old Index