summaryrefslogtreecommitdiff
path: root/drivers/tty/synclink_gt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/synclink_gt.c')
-rw-r--r--drivers/tty/synclink_gt.c27
1 files changed, 10 insertions, 17 deletions
diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c
index 5523cf7bd1c2..5bb928b7873e 100644
--- a/drivers/tty/synclink_gt.c
+++ b/drivers/tty/synclink_gt.c
@@ -768,7 +768,7 @@ static int write(struct tty_struct *tty,
if (!info->tx_buf || (count > info->max_frame_size))
return -EIO;
- if (!count || tty->stopped || tty->hw_stopped)
+ if (!count || tty->flow.stopped || tty->hw_stopped)
return 0;
spin_lock_irqsave(&info->lock, flags);
@@ -868,15 +868,15 @@ exit:
DBGINFO(("%s wait_until_sent exit\n", info->device_name));
}
-static int write_room(struct tty_struct *tty)
+static unsigned int write_room(struct tty_struct *tty)
{
struct slgt_info *info = tty->driver_data;
- int ret;
+ unsigned int ret;
if (sanity_check(info, tty->name, "write_room"))
return 0;
ret = (info->tx_active) ? 0 : HDLC_MAX_FRAME_SIZE;
- DBGINFO(("%s write_room=%d\n", info->device_name, ret));
+ DBGINFO(("%s write_room=%u\n", info->device_name, ret));
return ret;
}
@@ -889,7 +889,7 @@ static void flush_chars(struct tty_struct *tty)
return;
DBGINFO(("%s flush_chars entry tx_count=%d\n", info->device_name, info->tx_count));
- if (info->tx_count <= 0 || tty->stopped ||
+ if (info->tx_count <= 0 || tty->flow.stopped ||
tty->hw_stopped || !info->tx_buf)
return;
@@ -1254,14 +1254,14 @@ static int synclink_gt_proc_show(struct seq_file *m, void *v)
/*
* return count of bytes in transmit buffer
*/
-static int chars_in_buffer(struct tty_struct *tty)
+static unsigned int chars_in_buffer(struct tty_struct *tty)
{
struct slgt_info *info = tty->driver_data;
- int count;
+ unsigned int count;
if (sanity_check(info, tty->name, "chars_in_buffer"))
return 0;
count = tbuf_bytes(info);
- DBGINFO(("%s chars_in_buffer()=%d\n", info->device_name, count));
+ DBGINFO(("%s chars_in_buffer()=%u\n", info->device_name, count));
return count;
}
@@ -2241,7 +2241,7 @@ static void isr_txeom(struct slgt_info *info, unsigned short status)
else
#endif
{
- if (info->port.tty && (info->port.tty->stopped || info->port.tty->hw_stopped)) {
+ if (info->port.tty && (info->port.tty->flow.stopped || info->port.tty->hw_stopped)) {
tx_stop(info);
return;
}
@@ -2465,14 +2465,7 @@ static void change_params(struct slgt_info *info)
/* byte size and parity */
- switch (cflag & CSIZE) {
- case CS5: info->params.data_bits = 5; break;
- case CS6: info->params.data_bits = 6; break;
- case CS7: info->params.data_bits = 7; break;
- case CS8: info->params.data_bits = 8; break;
- default: info->params.data_bits = 7; break;
- }
-
+ info->params.data_bits = tty_get_char_size(cflag);
info->params.stop_bits = (cflag & CSTOPB) ? 2 : 1;
if (cflag & PARENB)