diff options
| author | Warner Losh <imp@FreeBSD.org> | 2005-07-15 04:19:42 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2005-07-15 04:19:42 +0000 |
| commit | f83fe7ce9087c4b59a97b19451425d7b077e5de9 (patch) | |
| tree | 5ad294fee569464596402622ad83fc1adcfe0d90 /sys/dev/usb | |
| parent | ce71e8d87fb2dba46872e2b73af85050475b6298 (diff) | |
Notes
Diffstat (limited to 'sys/dev/usb')
| -rw-r--r-- | sys/dev/usb/ulpt.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c index 9716b65ea9ffc..8a6ac3fa59546 100644 --- a/sys/dev/usb/ulpt.c +++ b/sys/dev/usb/ulpt.c @@ -509,7 +509,7 @@ ulptopen(struct cdev *dev, int flag, int mode, usb_proc_ptr p) u_char flags = ULPTFLAGS(dev); struct ulpt_softc *sc; usbd_status err; - int spin, error; + int error; USB_GET_SC_OPEN(ulpt, ULPTUNIT(dev), sc); @@ -543,28 +543,6 @@ ulptopen(struct cdev *dev, int flag, int mode, usb_proc_ptr p) } } - for (spin = 0; (ulpt_status(sc) & LPS_SELECT) == 0; spin += STEP) { - DPRINTF(("ulpt_open: waiting a while\n")); - if (spin >= TIMEOUT) { - error = EBUSY; - sc->sc_state = 0; - goto done; - } - - /* wait 1/4 second, give up if we get a signal */ - error = tsleep(sc, LPTPRI | PCATCH, "ulptop", STEP); - if (error != EWOULDBLOCK) { - sc->sc_state = 0; - goto done; - } - - if (sc->sc_dying) { - error = ENXIO; - sc->sc_state = 0; - goto done; - } - } - err = usbd_open_pipe(sc->sc_iface, sc->sc_out, 0, &sc->sc_out_pipe); if (err) { error = EIO; |
