Source-Changes-HG archive

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

[src/jmcneill-usbmp]: src/sys/dev/usb kill some #ifdef USB_DEBUG with some co...



details:   https://anonhg.NetBSD.org/src/rev/43e5aa09f9b2
branches:  jmcneill-usbmp
changeset: 771784:43e5aa09f9b2
user:      mrg <mrg%NetBSD.org@localhost>
date:      Wed Dec 07 22:52:17 2011 +0000

description:
kill some #ifdef USB_DEBUG with some compiler smarts.

diffstat:

 sys/dev/usb/usb.c |  16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)

diffs (56 lines):

diff -r 45548396034b -r 43e5aa09f9b2 sys/dev/usb/usb.c
--- a/sys/dev/usb/usb.c Wed Dec 07 05:41:53 2011 +0000
+++ b/sys/dev/usb/usb.c Wed Dec 07 22:52:17 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usb.c,v 1.125.6.2 2011/12/06 02:10:01 mrg Exp $        */
+/*     $NetBSD: usb.c,v 1.125.6.3 2011/12/07 22:52:17 mrg Exp $        */
 
 /*
  * Copyright (c) 1998, 2002, 2008 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.125.6.2 2011/12/06 02:10:01 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.125.6.3 2011/12/07 22:52:17 mrg Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_usb.h"
@@ -83,6 +83,7 @@
 #else
 #define DPRINTF(x)
 #define DPRINTFN(n,x)
+#define        usb_noexplore 0
 #endif
 
 struct usb_softc {
@@ -372,17 +373,10 @@
        config_pending_decr();
 
        while (!sc->sc_dying) {
-#ifdef USB_DEBUG
                if (usb_noexplore < 2)
-#endif
-               usb_discover(sc);
-#ifdef USB_DEBUG
+                       usb_discover(sc);
                (void)tsleep(&sc->sc_bus->needs_explore, PWAIT, "usbevt",
                    usb_noexplore ? 0 : hz * 60);
-#else
-               (void)tsleep(&sc->sc_bus->needs_explore, PWAIT, "usbevt",
-                   hz * 60);
-#endif
                DPRINTFN(2,("usb_event_thread: woke up\n"));
        }
        sc->sc_event_thread = NULL;
@@ -777,10 +771,8 @@
 {
 
        DPRINTFN(2,("usb_discover\n"));
-#ifdef USB_DEBUG
        if (usb_noexplore > 1)
                return;
-#endif
        /*
         * We need mutual exclusion while traversing the device tree,
         * but this is guaranteed since this function is only called



Home | Main Index | Thread Index | Old Index