~ubuntu-branches/ubuntu/wily/linux-ti-omap4/wily

« back to all changes in this revision

Viewing changes to drivers/usb/serial/pl2303.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati
  • Date: 2013-07-11 18:35:20 UTC
  • Revision ID: package-import@ubuntu.com-20130711183520-htnf1x4y5r11hndr
Tags: 3.5.0-229.42
* Release Tracking Bug
  - LP: #1199276

[ Paolo Pisati ]

* [Config] CONFIG_ATH9K_LEGACY_RATE_CONTROL is not set

Show diffs side-by-side

added added

removed removed

Lines of Context:
258
258
           serial settings even to the same values as before. Thus
259
259
           we actually need to filter in this specific case */
260
260
 
261
 
        if (!tty_termios_hw_change(tty->termios, old_termios))
 
261
        if (old_termios && !tty_termios_hw_change(tty->termios, old_termios))
262
262
                return;
263
263
 
264
264
        cflag = tty->termios->c_cflag;
267
267
        if (!buf) {
268
268
                dev_err(&port->dev, "%s - out of memory.\n", __func__);
269
269
                /* Report back no change occurred */
270
 
                *tty->termios = *old_termios;
 
270
                if (old_termios)
 
271
                        *tty->termios = *old_termios;
271
272
                return;
272
273
        }
273
274
 
407
408
        control = priv->line_control;
408
409
        if ((cflag & CBAUD) == B0)
409
410
                priv->line_control &= ~(CONTROL_DTR | CONTROL_RTS);
410
 
        else if ((old_termios->c_cflag & CBAUD) == B0)
 
411
        else if (old_termios && (old_termios->c_cflag & CBAUD) == B0)
411
412
                priv->line_control |= (CONTROL_DTR | CONTROL_RTS);
412
413
        if (control != priv->line_control) {
413
414
                control = priv->line_control;
466
467
 
467
468
static int pl2303_open(struct tty_struct *tty, struct usb_serial_port *port)
468
469
{
469
 
        struct ktermios tmp_termios;
470
470
        struct usb_serial *serial = port->serial;
471
471
        struct pl2303_private *priv = usb_get_serial_port_data(port);
472
472
        int result;
482
482
 
483
483
        /* Setup termios */
484
484
        if (tty)
485
 
                pl2303_set_termios(tty, port, &tmp_termios);
 
485
                pl2303_set_termios(tty, port, NULL);
486
486
 
487
487
        result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
488
488
        if (result) {