TTY: move low_latency to tty_port
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / tty / serial / crisv10.c
index 35ee6a2c6877ef45a599351ff5fd74c8c142fe99..52449adc09ac164089ed8f8dd9c1113a35d93dda 100644 (file)
@@ -1760,8 +1760,7 @@ add_char_and_flag(struct e100_serial *info, unsigned char data, unsigned char fl
 
                info->icount.rx++;
        } else {
-               struct tty_struct *tty = info->port.tty;
-               tty_insert_flip_char(tty, data, flag);
+               tty_insert_flip_char(&info->port, data, flag);
                info->icount.rx++;
        }
 
@@ -2120,7 +2119,7 @@ static void flush_to_flip_buffer(struct e100_serial *info)
        while ((buffer = info->first_recv_buffer) != NULL) {
                unsigned int count = buffer->length;
 
-               tty_insert_flip_string(tty, buffer->buffer, count);
+               tty_insert_flip_string(&info->port, buffer->buffer, count);
                info->recv_cnt -= count;
 
                if (count == buffer->length) {
@@ -2338,8 +2337,7 @@ more_data:
                                        data_in, data_read);
                                char flag = TTY_NORMAL;
                                if (info->errorcode == ERRCODE_INSERT_BREAK) {
-                                       struct tty_struct *tty = info->port.tty;
-                                       tty_insert_flip_char(tty, 0, flag);
+                                       tty_insert_flip_char(&info->port, 0, flag);
                                        info->icount.rx++;
                                }
 
@@ -2353,7 +2351,7 @@ more_data:
                                        info->icount.frame++;
                                        flag = TTY_FRAME;
                                }
-                               tty_insert_flip_char(tty, data, flag);
+                               tty_insert_flip_char(&info->port, data, flag);
                                info->errorcode = 0;
                        }
                        info->break_detected_cnt = 0;
@@ -2369,7 +2367,7 @@ more_data:
                        log_int(rdpc(), 0, 0);
                }
                );
-               tty_insert_flip_char(tty,
+               tty_insert_flip_char(&info->port,
                        IO_EXTRACT(R_SERIAL0_READ, data_in, data_read),
                        TTY_NORMAL);
        } else {
@@ -3464,7 +3462,7 @@ set_serial_info(struct e100_serial *info,
        info->type = new_serial.type;
        info->close_delay = new_serial.close_delay;
        info->closing_wait = new_serial.closing_wait;
-       info->port.tty->low_latency = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
+       info->port.low_latency = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
 
  check_and_exit:
        if (info->flags & ASYNC_INITIALIZED) {
@@ -4108,7 +4106,7 @@ rs_open(struct tty_struct *tty, struct file * filp)
        tty->driver_data = info;
        info->port.tty = tty;
 
-       tty->low_latency = !!(info->flags & ASYNC_LOW_LATENCY);
+       info->port.low_latency = !!(info->flags & ASYNC_LOW_LATENCY);
 
        /*
         * If the port is in the middle of closing, bail out now