aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/isicom.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/isicom.c')
-rw-r--r--drivers/char/isicom.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c
index 57b115272aaa..9c6be8da220c 100644
--- a/drivers/char/isicom.c
+++ b/drivers/char/isicom.c
@@ -1140,28 +1140,29 @@ static int isicom_write(struct tty_struct *tty, const unsigned char *buf,
1140} 1140}
1141 1141
1142/* put_char et all */ 1142/* put_char et all */
1143static void isicom_put_char(struct tty_struct *tty, unsigned char ch) 1143static int isicom_put_char(struct tty_struct *tty, unsigned char ch)
1144{ 1144{
1145 struct isi_port *port = tty->driver_data; 1145 struct isi_port *port = tty->driver_data;
1146 struct isi_board *card = port->card; 1146 struct isi_board *card = port->card;
1147 unsigned long flags; 1147 unsigned long flags;
1148 1148
1149 if (isicom_paranoia_check(port, tty->name, "isicom_put_char")) 1149 if (isicom_paranoia_check(port, tty->name, "isicom_put_char"))
1150 return; 1150 return 0;
1151 1151
1152 if (!port->xmit_buf) 1152 if (!port->xmit_buf)
1153 return; 1153 return 0;
1154 1154
1155 spin_lock_irqsave(&card->card_lock, flags); 1155 spin_lock_irqsave(&card->card_lock, flags);
1156 if (port->xmit_cnt >= SERIAL_XMIT_SIZE - 1) 1156 if (port->xmit_cnt >= SERIAL_XMIT_SIZE - 1) {
1157 goto out; 1157 spin_unlock_irqrestore(&card->card_lock, flags);
1158 return 0;
1159 }
1158 1160
1159 port->xmit_buf[port->xmit_head++] = ch; 1161 port->xmit_buf[port->xmit_head++] = ch;
1160 port->xmit_head &= (SERIAL_XMIT_SIZE - 1); 1162 port->xmit_head &= (SERIAL_XMIT_SIZE - 1);
1161 port->xmit_cnt++; 1163 port->xmit_cnt++;
1162 spin_unlock_irqrestore(&card->card_lock, flags); 1164 spin_unlock_irqrestore(&card->card_lock, flags);
1163out: 1165 return 1;
1164 return;
1165} 1166}
1166 1167
1167/* flush_chars et all */ 1168/* flush_chars et all */