summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/input
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb/input')
-rw-r--r--sys/dev/usb/input/atp.c12
-rw-r--r--sys/dev/usb/input/uhid.c2
-rw-r--r--sys/dev/usb/input/ukbd.c6
-rw-r--r--sys/dev/usb/input/ums.c6
4 files changed, 14 insertions, 12 deletions
diff --git a/sys/dev/usb/input/atp.c b/sys/dev/usb/input/atp.c
index 6c0ce2c..c0fe6d4 100644
--- a/sys/dev/usb/input/atp.c
+++ b/sys/dev/usb/input/atp.c
@@ -116,7 +116,7 @@ __FBSDID("$FreeBSD$");
/* Tunables */
SYSCTL_NODE(_hw_usb, OID_AUTO, atp, CTLFLAG_RW, 0, "USB atp");
-#if USB_DEBUG
+#ifdef USB_DEBUG
enum atp_log_level {
ATP_LLEVEL_DISABLED = 0,
ATP_LLEVEL_ERROR,
@@ -126,7 +126,7 @@ enum atp_log_level {
static int atp_debug = ATP_LLEVEL_ERROR; /* the default is to only log errors */
SYSCTL_INT(_hw_usb_atp, OID_AUTO, debug, CTLFLAG_RW,
&atp_debug, ATP_LLEVEL_ERROR, "ATP debug level");
-#endif /* #if USB_DEBUG */
+#endif /* USB_DEBUG */
static u_int atp_touch_timeout = ATP_TOUCH_TIMEOUT;
SYSCTL_INT(_hw_usb_atp, OID_AUTO, touch_timeout, CTLFLAG_RW, &atp_touch_timeout,
@@ -1055,7 +1055,7 @@ atp_update_strokes(struct atp_softc *sc, atp_pspan *pspans_x,
if (pspans_y[j].matched == FALSE) break;
}
if ((i < n_xpspans) && (j < n_ypspans)) {
-#if USB_DEBUG
+#ifdef USB_DEBUG
if (atp_debug >= ATP_LLEVEL_INFO) {
printf("unmatched pspans:");
for (; i < n_xpspans; i++) {
@@ -1072,7 +1072,7 @@ atp_update_strokes(struct atp_softc *sc, atp_pspan *pspans_x,
}
printf("\n");
}
-#endif /* #if USB_DEBUG */
+#endif /* USB_DEBUG */
if ((n_xpspans == 1) && (n_ypspans == 1))
/* The common case of a single pair of new pspans. */
atp_add_stroke(sc, &pspans_x[0], &pspans_y[0]);
@@ -1082,7 +1082,7 @@ atp_update_strokes(struct atp_softc *sc, atp_pspan *pspans_x,
pspans_y, n_ypspans);
}
-#if USB_DEBUG
+#ifdef USB_DEBUG
if (atp_debug >= ATP_LLEVEL_INFO) {
for (i = 0; i < sc->sc_n_strokes; i++) {
atp_stroke *stroke = &sc->sc_strokes[i];
@@ -1110,7 +1110,7 @@ atp_update_strokes(struct atp_softc *sc, atp_pspan *pspans_x,
if (sc->sc_n_strokes)
printf("\n");
}
-#endif /* #if USB_DEBUG */
+#endif /* USB_DEBUG */
return (movement);
}
diff --git a/sys/dev/usb/input/uhid.c b/sys/dev/usb/input/uhid.c
index a471991..d36ecf3 100644
--- a/sys/dev/usb/input/uhid.c
+++ b/sys/dev/usb/input/uhid.c
@@ -76,7 +76,7 @@ __FBSDID("$FreeBSD$");
#include <dev/usb/input/usb_rdesc.h>
#include <dev/usb/quirk/usb_quirk.h>
-#if USB_DEBUG
+#ifdef USB_DEBUG
static int uhid_debug = 0;
SYSCTL_NODE(_hw_usb, OID_AUTO, uhid, CTLFLAG_RW, 0, "USB uhid");
diff --git a/sys/dev/usb/input/ukbd.c b/sys/dev/usb/input/ukbd.c
index f446db7..034a781 100644
--- a/sys/dev/usb/input/ukbd.c
+++ b/sys/dev/usb/input/ukbd.c
@@ -88,7 +88,7 @@ __FBSDID("$FreeBSD$");
/* the following file must be included after "ukbdmap.h" */
#include <dev/kbd/kbdtables.h>
-#if USB_DEBUG
+#ifdef USB_DEBUG
static int ukbd_debug = 0;
static int ukbd_no_leds = 0;
@@ -612,7 +612,7 @@ ukbd_intr_callback(struct usb_xfer *xfer, usb_error_t error)
apple_fn = 1;
else
apple_fn = 0;
-#if USB_DEBUG
+#ifdef USB_DEBUG
DPRINTF("apple_eject=%u apple_fn=%u\n",
apple_eject, apple_fn);
@@ -678,7 +678,7 @@ ukbd_set_leds_callback(struct usb_xfer *xfer, usb_error_t error)
uint8_t buf[2];
struct ukbd_softc *sc = usbd_xfer_softc(xfer);
-#if USB_DEBUG
+#ifdef USB_DEBUG
if (ukbd_no_leds)
return;
#endif
diff --git a/sys/dev/usb/input/ums.c b/sys/dev/usb/input/ums.c
index a4385b9..e1e37be 100644
--- a/sys/dev/usb/input/ums.c
+++ b/sys/dev/usb/input/ums.c
@@ -74,7 +74,7 @@ __FBSDID("$FreeBSD$");
#include <sys/tty.h>
#include <sys/mouse.h>
-#if USB_DEBUG
+#ifdef USB_DEBUG
static int ums_debug = 0;
SYSCTL_NODE(_hw_usb, OID_AUTO, ums, CTLFLAG_RW, 0, "USB ums");
@@ -494,7 +494,9 @@ ums_attach(device_t dev)
int err;
uint16_t d_len;
uint8_t i;
+#ifdef USB_DEBUG
uint8_t j;
+#endif
DPRINTFN(11, "sc=%p\n", sc);
@@ -588,7 +590,7 @@ ums_attach(device_t dev)
free(d_ptr, M_TEMP);
d_ptr = NULL;
-#if USB_DEBUG
+#ifdef USB_DEBUG
for (j = 0; j < UMS_INFO_MAX; j++) {
info = &sc->sc_info[j];
OpenPOWER on IntegriCloud