Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

riscom/rocket: switch to int put_char method

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Alan Cox and committed by
Linus Torvalds
bbbbb96f d7e752e2

+9 -5
+6 -3
drivers/char/riscom8.c
··· 1161 1161 return total; 1162 1162 } 1163 1163 1164 - static void rc_put_char(struct tty_struct * tty, unsigned char ch) 1164 + static int rc_put_char(struct tty_struct * tty, unsigned char ch) 1165 1165 { 1166 1166 struct riscom_port *port = (struct riscom_port *)tty->driver_data; 1167 1167 unsigned long flags; 1168 + int ret = 0; 1168 1169 1169 1170 if (rc_paranoia_check(port, tty->name, "rc_put_char")) 1170 - return; 1171 + return 0; 1171 1172 1172 1173 if (!tty || !port->xmit_buf) 1173 - return; 1174 + return 0; 1174 1175 1175 1176 spin_lock_irqsave(&riscom_lock, flags); 1176 1177 ··· 1181 1180 port->xmit_buf[port->xmit_head++] = ch; 1182 1181 port->xmit_head &= SERIAL_XMIT_SIZE - 1; 1183 1182 port->xmit_cnt++; 1183 + ret = 1; 1184 1184 1185 1185 out: 1186 1186 spin_unlock_irqrestore(&riscom_lock, flags); 1187 + return ret; 1187 1188 } 1188 1189 1189 1190 static void rc_flush_chars(struct tty_struct * tty)
+3 -2
drivers/char/rocket.c
··· 1663 1663 * writing routines will write directly to transmit FIFO. 1664 1664 * Write buffer and counters protected by spinlocks 1665 1665 */ 1666 - static void rp_put_char(struct tty_struct *tty, unsigned char ch) 1666 + static int rp_put_char(struct tty_struct *tty, unsigned char ch) 1667 1667 { 1668 1668 struct r_port *info = (struct r_port *) tty->driver_data; 1669 1669 CHANNEL_t *cp; 1670 1670 unsigned long flags; 1671 1671 1672 1672 if (rocket_paranoia_check(info, "rp_put_char")) 1673 - return; 1673 + return 0; 1674 1674 1675 1675 /* 1676 1676 * Grab the port write mutex, locking out other processes that try to ··· 1699 1699 } 1700 1700 spin_unlock_irqrestore(&info->slock, flags); 1701 1701 mutex_unlock(&info->write_mtx); 1702 + return 1; 1702 1703 } 1703 1704 1704 1705 /*