diff options
Diffstat (limited to 'drivers/tty/synclink_gt.c')
-rw-r--r-- | drivers/tty/synclink_gt.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c index 33f258d6fef9..16e469e581ec 100644 --- a/drivers/tty/synclink_gt.c +++ b/drivers/tty/synclink_gt.c @@ -287,7 +287,6 @@ struct slgt_info { unsigned char *tx_buf; int tx_count; - char *flag_buf; bool drop_rts_on_tx_done; struct _input_signal_events input_signal_events; @@ -730,7 +729,7 @@ static void set_termios(struct tty_struct *tty, /* Handle turning off CRTSCTS */ if ((old_termios->c_cflag & CRTSCTS) && !C_CRTSCTS(tty)) { - tty->hw_stopped = 0; + tty->hw_stopped = false; tx_release(tty); } } @@ -1953,13 +1952,13 @@ static void cts_change(struct slgt_info *info, unsigned short status) if (info->port.tty) { if (info->port.tty->hw_stopped) { if (info->signals & SerialSignal_CTS) { - info->port.tty->hw_stopped = 0; + info->port.tty->hw_stopped = false; info->pending_bh |= BH_TRANSMIT; return; } } else { if (!(info->signals & SerialSignal_CTS)) - info->port.tty->hw_stopped = 1; + info->port.tty->hw_stopped = true; } } } @@ -3244,13 +3243,7 @@ static int alloc_tmp_rbuf(struct slgt_info *info) info->tmp_rbuf = kmalloc(info->max_frame_size + 5, GFP_KERNEL); if (info->tmp_rbuf == NULL) return -ENOMEM; - /* unused flag buffer to satisfy receive_buf calling interface */ - info->flag_buf = kzalloc(info->max_frame_size + 5, GFP_KERNEL); - if (!info->flag_buf) { - kfree(info->tmp_rbuf); - info->tmp_rbuf = NULL; - return -ENOMEM; - } + return 0; } @@ -3258,8 +3251,6 @@ static void free_tmp_rbuf(struct slgt_info *info) { kfree(info->tmp_rbuf); info->tmp_rbuf = NULL; - kfree(info->flag_buf); - info->flag_buf = NULL; } /* @@ -4657,7 +4648,8 @@ check_again: hdlcdev_rx(info,info->tmp_rbuf, framesize); else #endif - ldisc_receive_buf(tty, info->tmp_rbuf, info->flag_buf, framesize); + ldisc_receive_buf(tty, info->tmp_rbuf, NULL, + framesize); } } free_rbufs(info, start, end); @@ -4691,8 +4683,8 @@ static bool rx_get_buf(struct slgt_info *info) DBGDATA(info, info->rbufs[i].buf, count, "rx"); DBGINFO(("rx_get_buf size=%d\n", count)); if (count) - ldisc_receive_buf(info->port.tty, info->rbufs[i].buf, - info->flag_buf, count); + ldisc_receive_buf(info->port.tty, info->rbufs[i].buf, NULL, + count); free_rbufs(info, i, i); return true; } |