Skip to content

Commit 11a96d1

Browse files
Alan Coxtorvalds
Alan Cox
authored andcommitted
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 <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent a18992d commit 11a96d1

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

drivers/char/n_tty.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
* 2002/03/18 Implemented n_tty_wakeup to send SIGIO POLL_OUTs to
2828
* waiting writing processes-Sapan Bhatia <[email protected]>.
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
3030
* EAGAIN
3131
*/
3232

@@ -358,7 +358,7 @@ static int opost(unsigned char c, struct tty_struct *tty)
358358
* the simple cases normally found and helps to generate blocks of
359359
* symbols for the console driver and thus improve performance.
360360
*
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
362362
* on lock_kernel for the tty->column state.
363363
*/
364364

@@ -1183,7 +1183,7 @@ static inline int input_available_p(struct tty_struct *tty, int amt)
11831183
* @b: user data
11841184
* @nr: size of data
11851185
*
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
11871187
* ICANON is off; it copies characters straight from the tty queue to
11881188
* user space directly. It can be profitably called twice; once to
11891189
* drain the space from the tail pointer to the (physical) end of the
@@ -1250,7 +1250,7 @@ static int job_control(struct tty_struct *tty, struct file *file)
12501250
if (file->f_op->write != redirected_tty_write &&
12511251
current->signal->tty == tty) {
12521252
if (!tty->pgrp)
1253-
printk(KERN_ERR "read_chan: no tty->pgrp!\n");
1253+
printk(KERN_ERR "n_tty_read: no tty->pgrp!\n");
12541254
else if (task_pgrp(current) != tty->pgrp) {
12551255
if (is_ignored(SIGTTIN) ||
12561256
is_current_pgrp_orphaned())
@@ -1265,7 +1265,7 @@ static int job_control(struct tty_struct *tty, struct file *file)
12651265

12661266

12671267
/**
1268-
* read_chan - read function for tty
1268+
* n_tty_read - read function for tty
12691269
* @tty: tty device
12701270
* @file: file object
12711271
* @buf: userspace buffer pointer
@@ -1279,7 +1279,7 @@ static int job_control(struct tty_struct *tty, struct file *file)
12791279
* This code must be sure never to sleep through a hangup.
12801280
*/
12811281

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,
12831283
unsigned char __user *buf, size_t nr)
12841284
{
12851285
unsigned char __user *b = buf;
@@ -1481,7 +1481,7 @@ static ssize_t read_chan(struct tty_struct *tty, struct file *file,
14811481
}
14821482

14831483
/**
1484-
* write_chan - write function for tty
1484+
* n_tty_write - write function for tty
14851485
* @tty: tty device
14861486
* @file: file object
14871487
* @buf: userspace buffer pointer
@@ -1495,7 +1495,7 @@ static ssize_t read_chan(struct tty_struct *tty, struct file *file,
14951495
* This code must be sure never to sleep through a hangup.
14961496
*/
14971497

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,
14991499
const unsigned char *buf, size_t nr)
15001500
{
15011501
const unsigned char *b = buf;
@@ -1569,7 +1569,7 @@ static ssize_t write_chan(struct tty_struct *tty, struct file *file,
15691569
}
15701570

15711571
/**
1572-
* normal_poll - poll method for N_TTY
1572+
* n_tty_poll - poll method for N_TTY
15731573
* @tty: terminal device
15741574
* @file: file accessing it
15751575
* @wait: poll table
@@ -1582,7 +1582,7 @@ static ssize_t write_chan(struct tty_struct *tty, struct file *file,
15821582
* Called without the kernel lock held - fine
15831583
*/
15841584

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,
15861586
poll_table *wait)
15871587
{
15881588
unsigned int mask = 0;
@@ -1655,11 +1655,11 @@ struct tty_ldisc_ops tty_ldisc_N_TTY = {
16551655
.close = n_tty_close,
16561656
.flush_buffer = n_tty_flush_buffer,
16571657
.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,
16601660
.ioctl = n_tty_ioctl,
16611661
.set_termios = n_tty_set_termios,
1662-
.poll = normal_poll,
1662+
.poll = n_tty_poll,
16631663
.receive_buf = n_tty_receive_buf,
16641664
.write_wakeup = n_tty_write_wakeup
16651665
};

0 commit comments

Comments
 (0)