diff options
| author | Hans Petter Selasky <hselasky@FreeBSD.org> | 2016-09-14 12:07:34 +0000 |
|---|---|---|
| committer | Hans Petter Selasky <hselasky@FreeBSD.org> | 2016-09-14 12:07:34 +0000 |
| commit | 0eb8d462321b9b88bc4dd2fe3e1aa5fc8f460bb6 (patch) | |
| tree | 1753f8f8c24655c2e00fbb2c86405cefcb1d0086 /sys/dev/usb/serial | |
| parent | 275253770b5fa20590ddb84babe7ba48b2844712 (diff) | |
Notes
Diffstat (limited to 'sys/dev/usb/serial')
| -rw-r--r-- | sys/dev/usb/serial/usb_serial.c | 5 | ||||
| -rw-r--r-- | sys/dev/usb/serial/usb_serial.h | 6 |
2 files changed, 5 insertions, 6 deletions
diff --git a/sys/dev/usb/serial/usb_serial.c b/sys/dev/usb/serial/usb_serial.c index bdcc10f14509..23ee3305a181 100644 --- a/sys/dev/usb/serial/usb_serial.c +++ b/sys/dev/usb/serial/usb_serial.c @@ -79,7 +79,6 @@ __FBSDID("$FreeBSD$"); #include <sys/malloc.h> #include <sys/priv.h> #include <sys/cons.h> -#include <sys/kdb.h> #include <dev/uart/uart_ppstypes.h> @@ -1575,7 +1574,7 @@ ucom_cngetc(struct consdev *cd) UCOM_MTX_UNLOCK(sc); /* poll if necessary */ - if (kdb_active && sc->sc_callback->ucom_poll) + if (USB_IN_POLLING_MODE_FUNC() && sc->sc_callback->ucom_poll) (sc->sc_callback->ucom_poll) (sc); return (c); @@ -1611,7 +1610,7 @@ ucom_cnputc(struct consdev *cd, int c) UCOM_MTX_UNLOCK(sc); /* poll if necessary */ - if (kdb_active && sc->sc_callback->ucom_poll) { + if (USB_IN_POLLING_MODE_FUNC() && sc->sc_callback->ucom_poll) { (sc->sc_callback->ucom_poll) (sc); /* simple flow control */ if (temp == 0) diff --git a/sys/dev/usb/serial/usb_serial.h b/sys/dev/usb/serial/usb_serial.h index d003bf1748c0..9fbd373b0736 100644 --- a/sys/dev/usb/serial/usb_serial.h +++ b/sys/dev/usb/serial/usb_serial.h @@ -194,9 +194,9 @@ struct ucom_softc { uint8_t sc_jitterbuf[UCOM_JITTERBUF_SIZE]; }; -#define UCOM_MTX_ASSERT(sc, what) mtx_assert((sc)->sc_mtx, what) -#define UCOM_MTX_LOCK(sc) mtx_lock((sc)->sc_mtx) -#define UCOM_MTX_UNLOCK(sc) mtx_unlock((sc)->sc_mtx) +#define UCOM_MTX_ASSERT(sc, what) USB_MTX_ASSERT((sc)->sc_mtx, what) +#define UCOM_MTX_LOCK(sc) USB_MTX_LOCK((sc)->sc_mtx) +#define UCOM_MTX_UNLOCK(sc) USB_MTX_UNLOCK((sc)->sc_mtx) #define UCOM_UNLOAD_DRAIN(x) \ SYSUNINIT(var, SI_SUB_KLD - 2, SI_ORDER_ANY, ucom_drain_all, 0) |
