patch "tty: Remove external interface for tty_set_termios()" added to tty-next
Subsystems (2)
This is a note to let you know that I've just added the patch titled
tty: Remove external interface for tty_set_termios()
to my tty git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
in the tty-next branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release during the merge window.
If you have any questions about this process, please let me know.
Quoted 1 line
From
632f32e2107d37598e3f6816dcf00c7cab4081caMon Sep 17 00:00:00 2001
From: Peter Hurley <[email protected]>
Date: Sun, 25 Jan 2015 14:44:54 -0500
Subject: tty: Remove external interface for tty_set_termios()
tty_set_termios() is an internal helper intended for file scope use.
UART drivers which are capable of driving the RTS pin must properly handle the tiocmset() method, regardless of termios settings. A failure to do so is a UART driver bug and should be fixed there. Do not use this interface to workaround UART driver bugs.
--- drivers/bluetooth/hci_ath.c | 15 ++------------- drivers/tty/tty_ioctl.c | 3 +-- include/linux/tty.h | 1 - 3 files changed, 3 insertions(+), 16 deletions(-)
drivers/bluetooth/hci_ath.c +2 -13
@@ -51,33 +51,22 @@ struct ath_struct {static int ath_wakeup_ar3k (struct tty_struct *tty) { -struct ktermios ktermios;int status = tty->driver->ops->tiocmget (tty);if (status &TIOCM_CTS )return status; -/* Disable Automatic RTSCTS */ - ktermios = tty->termios; - ktermios.c_cflag &= ~CRTSCTS ; -tty_set_termios (tty, &ktermios); -/* Clear RTS first */ - status = tty->driver->ops->tiocmget (tty); + tty->driver->ops->tiocmget (tty); tty->driver->ops->tiocmset (tty,0x00 ,TIOCM_RTS );mdelay (20 );/* Set RTS, wake up board */ - status = tty->driver->ops->tiocmget (tty); + tty->driver->ops->tiocmget (tty); tty->driver->ops->tiocmset (tty,TIOCM_RTS ,0x00 );mdelay (20 ); status = tty->driver->ops->tiocmget (tty); - -/* Enable Automatic RTSCTS */ - ktermios.c_cflag |=CRTSCTS ; - status =tty_set_termios (tty, &ktermios); -return status; }
drivers/tty/tty_ioctl.c +1 -2
@@ -530,7 +530,7 @@ EXPORT_SYMBOL(tty_termios_hw_change);* Locking: termios_rwsem */ -int tty_set_termios (struct tty_struct *tty,struct ktermios *new_termios) +static int tty_set_termios (struct tty_struct *tty,struct ktermios *new_termios) {struct ktermios old_termios;struct tty_ldisc *ld;
@@ -563,7 +563,6 @@ int tty_set_termios(struct tty_struct *tty, struct ktermios *new_termios)up_write (&tty->termios_rwsem);return 0 ; } -EXPORT_SYMBOL_GPL (tty_set_termios);/** * set_termios - set termios values for a tty
include/linux/tty.h +0 -1
@@ -491,7 +491,6 @@ static inline speed_t tty_get_baud_rate(struct tty_struct *tty)extern void tty_termios_copy_hw (struct ktermios *new,struct ktermios *old);extern int tty_termios_hw_change (struct ktermios *a,struct ktermios *b); -extern int tty_set_termios (struct tty_struct *tty,struct ktermios *kt);extern struct tty_ldisc *tty_ldisc_ref (struct tty_struct *);extern void tty_ldisc_deref (struct tty_ldisc *);
Signature · 1 line
2.2.2