diff options
author | phk <phk@FreeBSD.org> | 2004-06-26 09:20:07 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-06-26 09:20:07 +0000 |
commit | 0567d4ef5fa68876b3d70414d79e61c5cad5db3e (patch) | |
tree | c93b5edd593fd013f81731c196b7d1369e3d5f78 /sys/dev/usb/ucom.c | |
parent | 21a36330b410b4bc4b67ebb64182227996dfb557 (diff) | |
download | FreeBSD-src-0567d4ef5fa68876b3d70414d79e61c5cad5db3e.zip FreeBSD-src-0567d4ef5fa68876b3d70414d79e61c5cad5db3e.tar.gz |
Pick the hotchar out of the tty structure instead of caching private
copies.
No current line disciplines have a dynamically changing hotchar, and
expecting to receive anything sensible during a change in ldisc is
insane so no locking of the hotchar field is necessary.
Diffstat (limited to 'sys/dev/usb/ucom.c')
-rw-r--r-- | sys/dev/usb/ucom.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c index 82245b7..2d28cf7 100644 --- a/sys/dev/usb/ucom.c +++ b/sys/dev/usb/ucom.c @@ -66,11 +66,6 @@ __FBSDID("$FreeBSD$"); * POSSIBILITY OF SUCH DAMAGE. */ -/* - * TODO: - * 1. How do I handle hotchar? - */ - #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> @@ -401,7 +396,7 @@ ucomopen(struct cdev *dev, int flag, int mode, usb_proc_ptr p) if (error) goto bad; - sc->hotchar = ttyldoptim(tp); + ttyldoptim(tp); DPRINTF(("%s: ucomopen: success\n", USBDEVNAME(sc->sc_dev))); @@ -461,7 +456,7 @@ ucomclose(struct cdev *dev, int flag, int mode, usb_proc_ptr p) s = spltty(); ttyld_close(tp, flag); - sc->hotchar = ttyldoptim(tp); + ttyldoptim(tp); ttyclose(tp); splx(s); @@ -563,7 +558,7 @@ ucomioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, usb_proc_ptr p) #endif error = ttyioctl(dev, cmd, data, flag, p); - sc->hotchar = ttyldoptim(tp); + ttyldoptim(tp); if (error != ENOTTY) { DPRINTF(("ucomioctl: l_ioctl: error = %d\n", error)); return (error); @@ -823,7 +818,7 @@ ucomparam(struct tty *tp, struct termios *t) (void)ucomctl(sc, UMCR_RTS, DMBIS); } - sc->hotchar = ttyldoptim(tp); + ttyldoptim(tp); uerr = ucomstartread(sc); if (uerr != USBD_NORMAL_COMPLETION) |