summaryrefslogtreecommitdiff
path: root/drivers/staging/serqt_usb2
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2013-01-03 15:53:03 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-15 22:21:36 -0800
commit92a19f9cec9a80ad93c06e115822deb729e2c6ad (patch)
tree80e1550ac1647a1cdf20a0b568554c0c50a63f75 /drivers/staging/serqt_usb2
parent2f69335710884ae6112fc8196ebe29b5cda7b79b (diff)
TTY: switch tty_insert_flip_char
Now, we start converting tty buffer functions to actually use tty_port. This will allow us to get rid of the need of tty in many call sites. Only tty_port will needed and hence no more tty_port_tty_get in those paths. tty_insert_flip_char is the next one to proceed. This one is used all over the code, so the patch is huge. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/serqt_usb2')
-rw-r--r--drivers/staging/serqt_usb2/serqt_usb2.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/staging/serqt_usb2/serqt_usb2.c b/drivers/staging/serqt_usb2/serqt_usb2.c
index 1b3e995d3a27..14965662d09c 100644
--- a/drivers/staging/serqt_usb2/serqt_usb2.c
+++ b/drivers/staging/serqt_usb2/serqt_usb2.c
@@ -255,12 +255,11 @@ static void ProcessModemStatus(struct quatech_port *qt_port,
wake_up_interruptible(&qt_port->wait);
}
-static void ProcessRxChar(struct tty_struct *tty, struct usb_serial_port *port,
- unsigned char data)
+static void ProcessRxChar(struct usb_serial_port *port, unsigned char data)
{
struct urb *urb = port->read_urb;
if (urb->actual_length)
- tty_insert_flip_char(tty, data, TTY_NORMAL);
+ tty_insert_flip_char(&port->port, data, TTY_NORMAL);
}
static void qt_write_bulk_callback(struct urb *urb)
@@ -335,8 +334,8 @@ static void qt_status_change_check(struct tty_struct *tty,
case 0xff:
dev_dbg(&port->dev, "No status sequence.\n");
- ProcessRxChar(tty, port, data[i]);
- ProcessRxChar(tty, port, data[i + 1]);
+ ProcessRxChar(port, data[i]);
+ ProcessRxChar(port, data[i + 1]);
i += 2;
break;
@@ -345,8 +344,8 @@ static void qt_status_change_check(struct tty_struct *tty,
continue;
}
- if (tty && urb->actual_length)
- tty_insert_flip_char(tty, data[i], TTY_NORMAL);
+ if (urb->actual_length)
+ tty_insert_flip_char(&port->port, data[i], TTY_NORMAL);
}
tty_flip_buffer_push(tty);