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

tty: rename the remaining oddly named n_tty functions

Original idea for this from a patch by Rodolfo Giometti which merges various
bits of PPS support

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Alan Cox and committed by
Linus Torvalds
11a96d18 a18992d4

+13 -13
+13 -13
drivers/char/n_tty.c
··· 26 26 * 27 27 * 2002/03/18 Implemented n_tty_wakeup to send SIGIO POLL_OUTs to 28 28 * waiting writing processes-Sapan Bhatia <sapan@corewars.org>. 29 - * Also fixed a bug in BLOCKING mode where write_chan returns 29 + * Also fixed a bug in BLOCKING mode where n_tty_write returns 30 30 * EAGAIN 31 31 */ 32 32 ··· 358 358 * the simple cases normally found and helps to generate blocks of 359 359 * symbols for the console driver and thus improve performance. 360 360 * 361 - * Called from write_chan under the tty layer write lock. Relies 361 + * Called from n_tty_write under the tty layer write lock. Relies 362 362 * on lock_kernel for the tty->column state. 363 363 */ 364 364 ··· 1183 1183 * @b: user data 1184 1184 * @nr: size of data 1185 1185 * 1186 - * Helper function to speed up read_chan. It is only called when 1186 + * Helper function to speed up n_tty_read. It is only called when 1187 1187 * ICANON is off; it copies characters straight from the tty queue to 1188 1188 * user space directly. It can be profitably called twice; once to 1189 1189 * drain the space from the tail pointer to the (physical) end of the ··· 1250 1250 if (file->f_op->write != redirected_tty_write && 1251 1251 current->signal->tty == tty) { 1252 1252 if (!tty->pgrp) 1253 - printk(KERN_ERR "read_chan: no tty->pgrp!\n"); 1253 + printk(KERN_ERR "n_tty_read: no tty->pgrp!\n"); 1254 1254 else if (task_pgrp(current) != tty->pgrp) { 1255 1255 if (is_ignored(SIGTTIN) || 1256 1256 is_current_pgrp_orphaned()) ··· 1265 1265 1266 1266 1267 1267 /** 1268 - * read_chan - read function for tty 1268 + * n_tty_read - read function for tty 1269 1269 * @tty: tty device 1270 1270 * @file: file object 1271 1271 * @buf: userspace buffer pointer ··· 1279 1279 * This code must be sure never to sleep through a hangup. 1280 1280 */ 1281 1281 1282 - static ssize_t read_chan(struct tty_struct *tty, struct file *file, 1282 + static ssize_t n_tty_read(struct tty_struct *tty, struct file *file, 1283 1283 unsigned char __user *buf, size_t nr) 1284 1284 { 1285 1285 unsigned char __user *b = buf; ··· 1481 1481 } 1482 1482 1483 1483 /** 1484 - * write_chan - write function for tty 1484 + * n_tty_write - write function for tty 1485 1485 * @tty: tty device 1486 1486 * @file: file object 1487 1487 * @buf: userspace buffer pointer ··· 1495 1495 * This code must be sure never to sleep through a hangup. 1496 1496 */ 1497 1497 1498 - static ssize_t write_chan(struct tty_struct *tty, struct file *file, 1498 + static ssize_t n_tty_write(struct tty_struct *tty, struct file *file, 1499 1499 const unsigned char *buf, size_t nr) 1500 1500 { 1501 1501 const unsigned char *b = buf; ··· 1569 1569 } 1570 1570 1571 1571 /** 1572 - * normal_poll - poll method for N_TTY 1572 + * n_tty_poll - poll method for N_TTY 1573 1573 * @tty: terminal device 1574 1574 * @file: file accessing it 1575 1575 * @wait: poll table ··· 1582 1582 * Called without the kernel lock held - fine 1583 1583 */ 1584 1584 1585 - static unsigned int normal_poll(struct tty_struct *tty, struct file *file, 1585 + static unsigned int n_tty_poll(struct tty_struct *tty, struct file *file, 1586 1586 poll_table *wait) 1587 1587 { 1588 1588 unsigned int mask = 0; ··· 1655 1655 .close = n_tty_close, 1656 1656 .flush_buffer = n_tty_flush_buffer, 1657 1657 .chars_in_buffer = n_tty_chars_in_buffer, 1658 - .read = read_chan, 1659 - .write = write_chan, 1658 + .read = n_tty_read, 1659 + .write = n_tty_write, 1660 1660 .ioctl = n_tty_ioctl, 1661 1661 .set_termios = n_tty_set_termios, 1662 - .poll = normal_poll, 1662 + .poll = n_tty_poll, 1663 1663 .receive_buf = n_tty_receive_buf, 1664 1664 .write_wakeup = n_tty_write_wakeup 1665 1665 };