提交 6ee9f4b4 编写于 作者: D Dmitry Torokhov

USB: drop tty argument from usb_serial_handle_sysrq_char()

Since handle_sysrq() does not take tty as argument anymore we can
drop it from usb_serial_handle_sysrq_char() as well.
Acked-by: NAlan Cox <alan@lxorguk.ukuu.org.uk>
Acked-by: NJason Wessel <jason.wessel@windriver.com>
Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 f335397d
...@@ -1831,7 +1831,7 @@ static int ftdi_process_packet(struct tty_struct *tty, ...@@ -1831,7 +1831,7 @@ static int ftdi_process_packet(struct tty_struct *tty,
if (port->port.console && port->sysrq) { if (port->port.console && port->sysrq) {
for (i = 0; i < len; i++, ch++) { for (i = 0; i < len; i++, ch++) {
if (!usb_serial_handle_sysrq_char(tty, port, *ch)) if (!usb_serial_handle_sysrq_char(port, *ch))
tty_insert_flip_char(tty, *ch, flag); tty_insert_flip_char(tty, *ch, flag);
} }
} else { } else {
......
...@@ -343,7 +343,7 @@ void usb_serial_generic_process_read_urb(struct urb *urb) ...@@ -343,7 +343,7 @@ void usb_serial_generic_process_read_urb(struct urb *urb)
tty_insert_flip_string(tty, ch, urb->actual_length); tty_insert_flip_string(tty, ch, urb->actual_length);
else { else {
for (i = 0; i < urb->actual_length; i++, ch++) { for (i = 0; i < urb->actual_length; i++, ch++) {
if (!usb_serial_handle_sysrq_char(tty, port, *ch)) if (!usb_serial_handle_sysrq_char(port, *ch))
tty_insert_flip_char(tty, *ch, TTY_NORMAL); tty_insert_flip_char(tty, *ch, TTY_NORMAL);
} }
} }
...@@ -448,8 +448,7 @@ void usb_serial_generic_unthrottle(struct tty_struct *tty) ...@@ -448,8 +448,7 @@ void usb_serial_generic_unthrottle(struct tty_struct *tty)
EXPORT_SYMBOL_GPL(usb_serial_generic_unthrottle); EXPORT_SYMBOL_GPL(usb_serial_generic_unthrottle);
#ifdef CONFIG_MAGIC_SYSRQ #ifdef CONFIG_MAGIC_SYSRQ
int usb_serial_handle_sysrq_char(struct tty_struct *tty, int usb_serial_handle_sysrq_char(struct usb_serial_port *port, unsigned int ch)
struct usb_serial_port *port, unsigned int ch)
{ {
if (port->sysrq && port->port.console) { if (port->sysrq && port->port.console) {
if (ch && time_before(jiffies, port->sysrq)) { if (ch && time_before(jiffies, port->sysrq)) {
...@@ -462,8 +461,7 @@ int usb_serial_handle_sysrq_char(struct tty_struct *tty, ...@@ -462,8 +461,7 @@ int usb_serial_handle_sysrq_char(struct tty_struct *tty,
return 0; return 0;
} }
#else #else
int usb_serial_handle_sysrq_char(struct tty_struct *tty, int usb_serial_handle_sysrq_char(struct usb_serial_port *port, unsigned int ch)
struct usb_serial_port *port, unsigned int ch)
{ {
return 0; return 0;
} }
......
...@@ -788,7 +788,7 @@ static void pl2303_process_read_urb(struct urb *urb) ...@@ -788,7 +788,7 @@ static void pl2303_process_read_urb(struct urb *urb)
if (port->port.console && port->sysrq) { if (port->port.console && port->sysrq) {
for (i = 0; i < urb->actual_length; ++i) for (i = 0; i < urb->actual_length; ++i)
if (!usb_serial_handle_sysrq_char(tty, port, data[i])) if (!usb_serial_handle_sysrq_char(port, data[i]))
tty_insert_flip_char(tty, data[i], tty_flag); tty_insert_flip_char(tty, data[i], tty_flag);
} else { } else {
tty_insert_flip_string_fixed_flag(tty, data, tty_flag, tty_insert_flip_string_fixed_flag(tty, data, tty_flag,
......
...@@ -596,7 +596,7 @@ static int ssu100_process_packet(struct tty_struct *tty, ...@@ -596,7 +596,7 @@ static int ssu100_process_packet(struct tty_struct *tty,
if (port->port.console && port->sysrq) { if (port->port.console && port->sysrq) {
for (i = 0; i < len; i++, ch++) { for (i = 0; i < len; i++, ch++) {
if (!usb_serial_handle_sysrq_char(tty, port, *ch)) if (!usb_serial_handle_sysrq_char(port, *ch))
tty_insert_flip_char(tty, *ch, flag); tty_insert_flip_char(tty, *ch, flag);
} }
} else } else
......
...@@ -342,8 +342,7 @@ extern int usb_serial_generic_submit_read_urb(struct usb_serial_port *port, ...@@ -342,8 +342,7 @@ extern int usb_serial_generic_submit_read_urb(struct usb_serial_port *port,
extern void usb_serial_generic_process_read_urb(struct urb *urb); extern void usb_serial_generic_process_read_urb(struct urb *urb);
extern int usb_serial_generic_prepare_write_buffer(struct usb_serial_port *port, extern int usb_serial_generic_prepare_write_buffer(struct usb_serial_port *port,
void *dest, size_t size); void *dest, size_t size);
extern int usb_serial_handle_sysrq_char(struct tty_struct *tty, extern int usb_serial_handle_sysrq_char(struct usb_serial_port *port,
struct usb_serial_port *port,
unsigned int ch); unsigned int ch);
extern int usb_serial_handle_break(struct usb_serial_port *port); extern int usb_serial_handle_break(struct usb_serial_port *port);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册