Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146263
b: refs/heads/master
c: 852e99d
h: refs/heads/master
i:
  146261: b709f22
  146259: b01f687
  146255: bdb620c
v: v3
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Jun 11, 2009
1 parent 23b6eb7 commit ba0fd8e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f2c4c65c8350d885d74dcdea7061dcecc1223c36
refs/heads/master: 852e99d22f2231d232c45216b027565e3bae7add
22 changes: 9 additions & 13 deletions trunk/drivers/char/tty_ldisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ static struct tty_ldisc *tty_ldisc_try_get(int disc)
struct tty_ldisc *ld;
struct tty_ldisc_ops *ldops;
int err = -EINVAL;

ld = kmalloc(sizeof(struct tty_ldisc), GFP_KERNEL);
if (ld == NULL)
return ERR_PTR(-ENOMEM);
Expand Down Expand Up @@ -208,12 +208,12 @@ static void tty_ldisc_put(struct tty_ldisc *ld)
kfree(ld);
}

static void * tty_ldiscs_seq_start(struct seq_file *m, loff_t *pos)
static void *tty_ldiscs_seq_start(struct seq_file *m, loff_t *pos)
{
return (*pos < NR_LDISCS) ? pos : NULL;
}

static void * tty_ldiscs_seq_next(struct seq_file *m, void *v, loff_t *pos)
static void *tty_ldiscs_seq_next(struct seq_file *m, void *v, loff_t *pos)
{
(*pos)++;
return (*pos < NR_LDISCS) ? pos : NULL;
Expand All @@ -227,7 +227,7 @@ static int tty_ldiscs_seq_show(struct seq_file *m, void *v)
{
int i = *(loff_t *)v;
struct tty_ldisc *ld;

ld = tty_ldisc_try_get(i);
if (IS_ERR(ld))
return 0;
Expand Down Expand Up @@ -325,7 +325,6 @@ struct tty_ldisc *tty_ldisc_ref_wait(struct tty_struct *tty)
WARN_ON(tty->ldisc->refcount == 0);
return tty->ldisc;
}

EXPORT_SYMBOL_GPL(tty_ldisc_ref_wait);

/**
Expand All @@ -345,7 +344,6 @@ struct tty_ldisc *tty_ldisc_ref(struct tty_struct *tty)
return tty->ldisc;
return NULL;
}

EXPORT_SYMBOL_GPL(tty_ldisc_ref);

/**
Expand Down Expand Up @@ -373,7 +371,6 @@ void tty_ldisc_deref(struct tty_ldisc *ld)
wake_up(&tty_ldisc_wait);
spin_unlock_irqrestore(&tty_ldisc_lock, flags);
}

EXPORT_SYMBOL_GPL(tty_ldisc_deref);

/**
Expand Down Expand Up @@ -413,7 +410,6 @@ void tty_ldisc_flush(struct tty_struct *tty)
}
tty_buffer_flush(tty);
}

EXPORT_SYMBOL_GPL(tty_ldisc_flush);

/**
Expand Down Expand Up @@ -492,7 +488,7 @@ static void tty_ldisc_restore(struct tty_struct *tty, struct tty_ldisc *old)
if (tty_ldisc_open(tty, old) < 0) {
tty_ldisc_put(old);
/* This driver is always present */
new_ldisc =tty_ldisc_get(N_TTY);
new_ldisc = tty_ldisc_get(N_TTY);
if (IS_ERR(new_ldisc))
panic("n_tty: get");
tty_ldisc_assign(tty, new_ldisc);
Expand All @@ -514,7 +510,7 @@ static void tty_ldisc_restore(struct tty_struct *tty, struct tty_ldisc *old)
* be obtained while the delayed work queue halt ensures that no more
* data is fed to the ldisc.
*
* In order to wait for any existing references to complete see
* In order to wait for any existing references to complete see
* tty_ldisc_wait_idle.
*/

Expand Down Expand Up @@ -611,7 +607,7 @@ int tty_set_ldisc(struct tty_struct *tty, int ldisc)
mutex_lock(&tty->ldisc_mutex);
}
set_bit(TTY_LDISC_CHANGING, &tty->flags);

/*
* No more input please, we are switching. The new ldisc
* will update this value in the ldisc open function
Expand Down Expand Up @@ -841,8 +837,8 @@ int tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty)
* @tty: tty being shut down
* @o_tty: pair tty for pty/tty pairs
*
* Called during the final close of a tty/pty pair in order to shut down the
* line discpline layer. On exit the ldisc assigned is N_TTY and the
* Called during the final close of a tty/pty pair in order to shut down
* the line discpline layer. On exit the ldisc assigned is N_TTY and the
* ldisc has not been opened.
*/

Expand Down

0 comments on commit ba0fd8e

Please sign in to comment.