diff options
author | thompsa <thompsa@FreeBSD.org> | 2008-12-23 19:59:21 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2008-12-23 19:59:21 +0000 |
commit | 5b36b9db358a97ce359ba8d8fe44a7b4bb1b4131 (patch) | |
tree | cc17a38bf14bdf79d80a29635ff4fc8a63978e3d /sys/dev/usb2/serial/ulpt2.c | |
parent | 0a41f1543cee2ded6567b179490c72e14c27430c (diff) | |
download | FreeBSD-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.c | 10 |
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; |