diff options
author | Olof Johansson <olof@lixom.net> | 2012-11-05 13:09:12 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-11-05 13:09:12 -0500 |
commit | 6d06721570aa0c38d886e3036796d59983963a27 (patch) | |
tree | d674cf54e26837bee89095c211ffa362c8546f03 /drivers/usb/class | |
parent | 148a8698763130c96004ef419b5f0d44a93d413c (diff) | |
parent | 54ec52b6dd3b0ba4bc4eb97e7e1b2534705b326c (diff) |
Merge branch 'depends/tty' into next/headers
Merging in Greg's tty tree including a cleanup patch needed by the OMAP serial
header cleanups.
* depends/tty: (305 commits)
tty/serial/8250: Make omap hardware workarounds local to 8250.h
serial/8250/8250_early: Prevent rounding error in uartclk
serial: samsung: use clk_prepare_enable and clk_disable_unprepare
TTY: Report warning when low_latency flag is wrongly used
console: use might_sleep in console_lock
TTY: move tty buffers to tty_port
TTY: add port -> tty link
TTY: tty_buffer, cache pointer to tty->buf
TTY: move TTY_FLUSH* flags to tty_port
TTY: n_tty, propagate n_tty_data
TTY: move ldisc data from tty_struct: locks
TTY: move ldisc data from tty_struct: read_* and echo_* and canon_* stuff
TTY: move ldisc data from tty_struct: bitmaps
TTY: move ldisc data from tty_struct: simple members
TTY: n_tty, add ldisc data to n_tty
TTY: audit, stop accessing tty->icount
TTY: n_tty, remove bogus checks
TTY: n_tty, simplify read_buf+echo_buf allocation
TTY: hci_ldisc, remove invalid check in open
TTY: ldisc, wait for idle ldisc in release
...
Diffstat (limited to 'drivers/usb/class')
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 981f2132d128..6e49ec6f3adc 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -817,10 +817,6 @@ static const __u32 acm_tty_speed[] = { | |||
817 | 2500000, 3000000, 3500000, 4000000 | 817 | 2500000, 3000000, 3500000, 4000000 |
818 | }; | 818 | }; |
819 | 819 | ||
820 | static const __u8 acm_tty_size[] = { | ||
821 | 5, 6, 7, 8 | ||
822 | }; | ||
823 | |||
824 | static void acm_tty_set_termios(struct tty_struct *tty, | 820 | static void acm_tty_set_termios(struct tty_struct *tty, |
825 | struct ktermios *termios_old) | 821 | struct ktermios *termios_old) |
826 | { | 822 | { |
@@ -834,7 +830,21 @@ static void acm_tty_set_termios(struct tty_struct *tty, | |||
834 | newline.bParityType = termios->c_cflag & PARENB ? | 830 | newline.bParityType = termios->c_cflag & PARENB ? |
835 | (termios->c_cflag & PARODD ? 1 : 2) + | 831 | (termios->c_cflag & PARODD ? 1 : 2) + |
836 | (termios->c_cflag & CMSPAR ? 2 : 0) : 0; | 832 | (termios->c_cflag & CMSPAR ? 2 : 0) : 0; |
837 | newline.bDataBits = acm_tty_size[(termios->c_cflag & CSIZE) >> 4]; | 833 | switch (termios->c_cflag & CSIZE) { |
834 | case CS5: | ||
835 | newline.bDataBits = 5; | ||
836 | break; | ||
837 | case CS6: | ||
838 | newline.bDataBits = 6; | ||
839 | break; | ||
840 | case CS7: | ||
841 | newline.bDataBits = 7; | ||
842 | break; | ||
843 | case CS8: | ||
844 | default: | ||
845 | newline.bDataBits = 8; | ||
846 | break; | ||
847 | } | ||
838 | /* FIXME: Needs to clear unsupported bits in the termios */ | 848 | /* FIXME: Needs to clear unsupported bits in the termios */ |
839 | acm->clocal = ((termios->c_cflag & CLOCAL) != 0); | 849 | acm->clocal = ((termios->c_cflag & CLOCAL) != 0); |
840 | 850 | ||
@@ -1233,7 +1243,7 @@ made_compressed_probe: | |||
1233 | 1243 | ||
1234 | if (usb_endpoint_xfer_int(epwrite)) | 1244 | if (usb_endpoint_xfer_int(epwrite)) |
1235 | usb_fill_int_urb(snd->urb, usb_dev, | 1245 | usb_fill_int_urb(snd->urb, usb_dev, |
1236 | usb_sndbulkpipe(usb_dev, epwrite->bEndpointAddress), | 1246 | usb_sndintpipe(usb_dev, epwrite->bEndpointAddress), |
1237 | NULL, acm->writesize, acm_write_bulk, snd, epwrite->bInterval); | 1247 | NULL, acm->writesize, acm_write_bulk, snd, epwrite->bInterval); |
1238 | else | 1248 | else |
1239 | usb_fill_bulk_urb(snd->urb, usb_dev, | 1249 | usb_fill_bulk_urb(snd->urb, usb_dev, |