Commit d97ba9cd authored by Peter Hurley's avatar Peter Hurley Committed by Greg Kroah-Hartman

tty: core: Refactor parameters for unset_locked_termios() helper

Add tty as parameter to unset_locked_termios() and extract former
parameters, termios and locked, as locals.
Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 656fb867
...@@ -239,10 +239,10 @@ EXPORT_SYMBOL(tty_wait_until_sent); ...@@ -239,10 +239,10 @@ EXPORT_SYMBOL(tty_wait_until_sent);
* Termios Helper Methods * Termios Helper Methods
*/ */
static void unset_locked_termios(struct ktermios *termios, static void unset_locked_termios(struct tty_struct *tty, struct ktermios *old)
struct ktermios *old,
struct ktermios *locked)
{ {
struct ktermios *termios = &tty->termios;
struct ktermios *locked = &tty->termios_locked;
int i; int i;
#define NOSET_MASK(x, y, z) (x = ((x) & ~(z)) | ((y) & (z))) #define NOSET_MASK(x, y, z) (x = ((x) & ~(z)) | ((y) & (z)))
...@@ -556,7 +556,7 @@ int tty_set_termios(struct tty_struct *tty, struct ktermios *new_termios) ...@@ -556,7 +556,7 @@ int tty_set_termios(struct tty_struct *tty, struct ktermios *new_termios)
down_write(&tty->termios_rwsem); down_write(&tty->termios_rwsem);
old_termios = tty->termios; old_termios = tty->termios;
tty->termios = *new_termios; tty->termios = *new_termios;
unset_locked_termios(&tty->termios, &old_termios, &tty->termios_locked); unset_locked_termios(tty, &old_termios);
if (tty->ops->set_termios) if (tty->ops->set_termios)
tty->ops->set_termios(tty, &old_termios); tty->ops->set_termios(tty, &old_termios);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment