Skip to contentSkip to conversation

tty: Re-add external interface for tty_set_termios()

PATCH In review Frederic Danis 4 participants 4 messages Apr 10, 2015 – Apr 21, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tty: Re-add external interface for tty_set_termios()

This is needed by Bluetooth hci_uart module to be able to change speed of Bluetooth controller and local UART.

---
Re-send this patch on Peter Hurley request

 drivers/tty/tty_ioctl.c | 3 ++-
 include/linux/tty.h     | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/tty/tty_ioctl.c +2 -1
index 632fc81..8e53fe4 100644
@@ -536,7 +536,7 @@ EXPORT_SYMBOL(tty_termios_hw_change);
  *	Locking: termios_rwsem
  */
 
-static int tty_set_termios(struct tty_struct *tty, struct ktermios *new_termios)
+int tty_set_termios(struct tty_struct *tty, struct ktermios *new_termios)
 {
 	struct ktermios old_termios;
 	struct tty_ldisc *ld;
@@ -569,6 +569,7 @@ static 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 +1 -0
index 358a337..fe5623c 100644
@@ -491,6 +491,7 @@ 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
1.9.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Frederic Danis

This is needed by Bluetooth hci_uart module to be able to change speed of Bluetooth controller and local UART.

Because this is the lesser evil right now,

maintainer
#2 lore raw
Quoted 7 lines · Peter Hurley
Quoted 2 lines · Frederic Danis

This is needed by Bluetooth hci_uart module to be able to change speed of Bluetooth controller and local UART.

Because this is the lesser evil right now,

Does this need to be in 4.1-rc1? Or is this a 4.2 thing?

thanks,

greg k-h

maintainer
#3 lore raw

Hi Greg,

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

This is needed by Bluetooth hci_uart module to be able to change speed of Bluetooth controller and local UART.

Because this is the lesser evil right now,

Does this need to be in 4.1-rc1? Or is this a 4.2 thing?

if you can queue this up for 4.1-rc1, that would be great. We are using it. It is just the driver using it did not make it to 4.0-rc1 yet.

Regards

Marcel