Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 364255
b: refs/heads/master
c: 11cf48e
h: refs/heads/master
i:
  364253: 9ee9013
  364251: e1a4697
  364247: 4e437c0
  364239: f7dde2f
  364223: 8b44792
v: v3
  • Loading branch information
Peter Hurley authored and Greg Kroah-Hartman committed Mar 18, 2013
1 parent f7f1c6f commit 86fe476
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 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: 76bc35e78fdf1065ffa2bb62fabe3e8423d378c8
refs/heads/master: 11cf48eab21887a120f7f47c67b44a829e3c371d
46 changes: 23 additions & 23 deletions trunk/drivers/tty/tty_ldisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,29 +498,6 @@ static void tty_ldisc_restore(struct tty_struct *tty, struct tty_ldisc *old)
}
}

/**
* tty_ldisc_halt - shut down the line discipline
* @tty: tty device
*
* Shut down the line discipline and work queue for this tty device.
* The TTY_LDISC flag being cleared ensures no further references can
* be obtained while the delayed work queue halt ensures that no more
* data is fed to the ldisc.
*
* You need to do a 'flush_scheduled_work()' (outside the ldisc_mutex)
* in order to make sure any currently executing ldisc work is also
* flushed.
*/

static int tty_ldisc_halt(struct tty_struct *tty)
{
int scheduled;
clear_bit(TTY_LDISC, &tty->flags);
scheduled = cancel_work_sync(&tty->port->buf.work);
set_bit(TTY_LDISC_HALTED, &tty->flags);
return scheduled;
}

/**
* tty_ldisc_flush_works - flush all works of a tty
* @tty: tty device to flush works for
Expand Down Expand Up @@ -550,6 +527,29 @@ static int tty_ldisc_wait_idle(struct tty_struct *tty, long timeout)
return ret > 0 ? 0 : -EBUSY;
}

/**
* tty_ldisc_halt - shut down the line discipline
* @tty: tty device
*
* Shut down the line discipline and work queue for this tty device.
* The TTY_LDISC flag being cleared ensures no further references can
* be obtained while the delayed work queue halt ensures that no more
* data is fed to the ldisc.
*
* You need to do a 'flush_scheduled_work()' (outside the ldisc_mutex)
* in order to make sure any currently executing ldisc work is also
* flushed.
*/

static int tty_ldisc_halt(struct tty_struct *tty)
{
int scheduled;
clear_bit(TTY_LDISC, &tty->flags);
scheduled = cancel_work_sync(&tty->port->buf.work);
set_bit(TTY_LDISC_HALTED, &tty->flags);
return scheduled;
}

/**
* tty_ldisc_hangup_halt - halt the line discipline for hangup
* @tty: tty being hung up
Expand Down

0 comments on commit 86fe476

Please sign in to comment.