aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/char/riscom8.c9
-rw-r--r--drivers/char/rocket.c5
2 files changed, 9 insertions, 5 deletions
diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c
index a82c2a2d5e6c..221b5a292076 100644
--- a/drivers/char/riscom8.c
+++ b/drivers/char/riscom8.c
@@ -1161,16 +1161,17 @@ static int rc_write(struct tty_struct * tty,
1161 return total; 1161 return total;
1162} 1162}
1163 1163
1164static void rc_put_char(struct tty_struct * tty, unsigned char ch) 1164static int rc_put_char(struct tty_struct * tty, unsigned char ch)
1165{ 1165{
1166 struct riscom_port *port = (struct riscom_port *)tty->driver_data; 1166 struct riscom_port *port = (struct riscom_port *)tty->driver_data;
1167 unsigned long flags; 1167 unsigned long flags;
1168 int ret = 0;
1168 1169
1169 if (rc_paranoia_check(port, tty->name, "rc_put_char")) 1170 if (rc_paranoia_check(port, tty->name, "rc_put_char"))
1170 return; 1171 return 0;
1171 1172
1172 if (!tty || !port->xmit_buf) 1173 if (!tty || !port->xmit_buf)
1173 return; 1174 return 0;
1174 1175
1175 spin_lock_irqsave(&riscom_lock, flags); 1176 spin_lock_irqsave(&riscom_lock, flags);
1176 1177
@@ -1180,9 +1181,11 @@ static void rc_put_char(struct tty_struct * tty, unsigned char ch)
1180 port->xmit_buf[port->xmit_head++] = ch; 1181 port->xmit_buf[port->xmit_head++] = ch;
1181 port->xmit_head &= SERIAL_XMIT_SIZE - 1; 1182 port->xmit_head &= SERIAL_XMIT_SIZE - 1;
1182 port->xmit_cnt++; 1183 port->xmit_cnt++;
1184 ret = 1;
1183 1185
1184out: 1186out:
1185 spin_unlock_irqrestore(&riscom_lock, flags); 1187 spin_unlock_irqrestore(&riscom_lock, flags);
1188 return ret;
1186} 1189}
1187 1190
1188static void rc_flush_chars(struct tty_struct * tty) 1191static void rc_flush_chars(struct tty_struct * tty)
diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c
index 00cfb6c7fd46..743dc80a9325 100644
--- a/drivers/char/rocket.c
+++ b/drivers/char/rocket.c
@@ -1663,14 +1663,14 @@ static void rp_hangup(struct tty_struct *tty)
1663 * writing routines will write directly to transmit FIFO. 1663 * writing routines will write directly to transmit FIFO.
1664 * Write buffer and counters protected by spinlocks 1664 * Write buffer and counters protected by spinlocks
1665 */ 1665 */
1666static void rp_put_char(struct tty_struct *tty, unsigned char ch) 1666static int rp_put_char(struct tty_struct *tty, unsigned char ch)
1667{ 1667{
1668 struct r_port *info = (struct r_port *) tty->driver_data; 1668 struct r_port *info = (struct r_port *) tty->driver_data;
1669 CHANNEL_t *cp; 1669 CHANNEL_t *cp;
1670 unsigned long flags; 1670 unsigned long flags;
1671 1671
1672 if (rocket_paranoia_check(info, "rp_put_char")) 1672 if (rocket_paranoia_check(info, "rp_put_char"))
1673 return; 1673 return 0;
1674 1674
1675 /* 1675 /*
1676 * Grab the port write mutex, locking out other processes that try to 1676 * Grab the port write mutex, locking out other processes that try to
@@ -1699,6 +1699,7 @@ static void rp_put_char(struct tty_struct *tty, unsigned char ch)
1699 } 1699 }
1700 spin_unlock_irqrestore(&info->slock, flags); 1700 spin_unlock_irqrestore(&info->slock, flags);
1701 mutex_unlock(&info->write_mtx); 1701 mutex_unlock(&info->write_mtx);
1702 return 1;
1702} 1703}
1703 1704
1704/* 1705/*