diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-20 18:55:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-20 18:55:17 -0400 |
commit | e11c675ede0d42a405ae595528bf0b29ce1ae56f (patch) | |
tree | e0ec481e66e4a4b70289d78992b209639a582c0c /drivers/usb/serial/mct_u232.c | |
parent | 467f9957d9283be40101d7255d06fae7e211ff4c (diff) | |
parent | 7bd032dc2793afcbaf4a350056768da84cdbd89b (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (79 commits)
USB serial: update the console driver
usb-serial: straighten out serial_open
usb-serial: add missing tests and debug lines
usb-serial: rename subroutines
usb-serial: fix termios initialization logic
usb-serial: acquire references when a new tty is installed
usb-serial: change logic of serial lookups
usb-serial: put subroutines in logical order
usb-serial: change referencing of port and serial structures
tty: Char: mxser, use THRE for ASPP_OQUEUE ioctl
tty: Char: mxser, add support for CP112UL
uartlite: support shared interrupt lines
tty: USB: serial/mct_u232, fix tty refcnt
tty: riscom8, fix tty refcnt
tty: riscom8, fix shutdown declaration
TTY: fix typos
tty: Power: fix suspend vt regression
tty: vt: use printk_once
tty: handle VT specific compat ioctls in vt driver
n_tty: move echoctl check and clean up logic
...
Diffstat (limited to 'drivers/usb/serial/mct_u232.c')
-rw-r--r-- | drivers/usb/serial/mct_u232.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c index d8825e159aa5..ad4998bbf16f 100644 --- a/drivers/usb/serial/mct_u232.c +++ b/drivers/usb/serial/mct_u232.c | |||
@@ -93,8 +93,7 @@ static int debug; | |||
93 | */ | 93 | */ |
94 | static int mct_u232_startup(struct usb_serial *serial); | 94 | static int mct_u232_startup(struct usb_serial *serial); |
95 | static void mct_u232_release(struct usb_serial *serial); | 95 | static void mct_u232_release(struct usb_serial *serial); |
96 | static int mct_u232_open(struct tty_struct *tty, | 96 | static int mct_u232_open(struct tty_struct *tty, struct usb_serial_port *port); |
97 | struct usb_serial_port *port, struct file *filp); | ||
98 | static void mct_u232_close(struct usb_serial_port *port); | 97 | static void mct_u232_close(struct usb_serial_port *port); |
99 | static void mct_u232_dtr_rts(struct usb_serial_port *port, int on); | 98 | static void mct_u232_dtr_rts(struct usb_serial_port *port, int on); |
100 | static void mct_u232_read_int_callback(struct urb *urb); | 99 | static void mct_u232_read_int_callback(struct urb *urb); |
@@ -421,8 +420,7 @@ static void mct_u232_release(struct usb_serial *serial) | |||
421 | } | 420 | } |
422 | } /* mct_u232_release */ | 421 | } /* mct_u232_release */ |
423 | 422 | ||
424 | static int mct_u232_open(struct tty_struct *tty, | 423 | static int mct_u232_open(struct tty_struct *tty, struct usb_serial_port *port) |
425 | struct usb_serial_port *port, struct file *filp) | ||
426 | { | 424 | { |
427 | struct usb_serial *serial = port->serial; | 425 | struct usb_serial *serial = port->serial; |
428 | struct mct_u232_private *priv = usb_get_serial_port_data(port); | 426 | struct mct_u232_private *priv = usb_get_serial_port_data(port); |
@@ -568,10 +566,13 @@ static void mct_u232_read_int_callback(struct urb *urb) | |||
568 | * Work-a-round: handle the 'usual' bulk-in pipe here | 566 | * Work-a-round: handle the 'usual' bulk-in pipe here |
569 | */ | 567 | */ |
570 | if (urb->transfer_buffer_length > 2) { | 568 | if (urb->transfer_buffer_length > 2) { |
571 | tty = tty_port_tty_get(&port->port); | ||
572 | if (urb->actual_length) { | 569 | if (urb->actual_length) { |
573 | tty_insert_flip_string(tty, data, urb->actual_length); | 570 | tty = tty_port_tty_get(&port->port); |
574 | tty_flip_buffer_push(tty); | 571 | if (tty) { |
572 | tty_insert_flip_string(tty, data, | ||
573 | urb->actual_length); | ||
574 | tty_flip_buffer_push(tty); | ||
575 | } | ||
575 | tty_kref_put(tty); | 576 | tty_kref_put(tty); |
576 | } | 577 | } |
577 | goto exit; | 578 | goto exit; |