summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb2/serial/ulpt2.c
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2008-12-23 19:59:21 +0000
committerthompsa <thompsa@FreeBSD.org>2008-12-23 19:59:21 +0000
commit5b36b9db358a97ce359ba8d8fe44a7b4bb1b4131 (patch)
treecc17a38bf14bdf79d80a29635ff4fc8a63978e3d /sys/dev/usb2/serial/ulpt2.c
parent0a41f1543cee2ded6567b179490c72e14c27430c (diff)
downloadFreeBSD-src-5b36b9db358a97ce359ba8d8fe44a7b4bb1b4131.zip
FreeBSD-src-5b36b9db358a97ce359ba8d8fe44a7b4bb1b4131.tar.gz
Remove CALLOUT_RETURNUNLOCKED from the callouts, there is no reason for them to
drop the lock for us.
Diffstat (limited to 'sys/dev/usb2/serial/ulpt2.c')
-rw-r--r--sys/dev/usb2/serial/ulpt2.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/dev/usb2/serial/ulpt2.c b/sys/dev/usb2/serial/ulpt2.c
index d95b0fc..4b9f44b 100644
--- a/sys/dev/usb2/serial/ulpt2.c
+++ b/sys/dev/usb2/serial/ulpt2.c
@@ -560,8 +560,7 @@ ulpt_attach(device_t dev)
mtx_init(&sc->sc_mtx, "ulpt lock", NULL, MTX_DEF | MTX_RECURSE);
- usb2_callout_init_mtx(&sc->sc_watchdog,
- &sc->sc_mtx, CALLOUT_RETURNUNLOCKED);
+ usb2_callout_init_mtx(&sc->sc_watchdog, &sc->sc_mtx, 0);
/* search through all the descriptors looking for bidir mode */
@@ -671,9 +670,8 @@ found:
/* start reading of status */
mtx_lock(&sc->sc_mtx);
-
- ulpt_watchdog(sc); /* will unlock mutex */
-
+ ulpt_watchdog(sc);
+ mtx_unlock(&sc->sc_mtx);
return (0);
detach:
@@ -762,8 +760,6 @@ ulpt_watchdog(void *arg)
usb2_callout_reset(&sc->sc_watchdog,
hz, &ulpt_watchdog, sc);
-
- mtx_unlock(&sc->sc_mtx);
}
static devclass_t ulpt_devclass;
OpenPOWER on IntegriCloud