diff options
author | Jiri Slaby <jslaby@suse.cz> | 2013-01-03 09:53:04 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-16 01:22:35 -0500 |
commit | 05c7cd39907184328f48d3e7899f9cdd653ad336 (patch) | |
tree | 9d1ed5c757426aa20b7eccd853faa6b519a4aa7b /drivers/usb/serial/ti_usb_3410_5052.c | |
parent | 92a19f9cec9a80ad93c06e115822deb729e2c6ad (diff) |
TTY: switch tty_insert_flip_string
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_string this time.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/ti_usb_3410_5052.c')
-rw-r--r-- | drivers/usb/serial/ti_usb_3410_5052.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index f2530d2ef3c4..05077e3c7631 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c | |||
@@ -121,7 +121,7 @@ static void ti_interrupt_callback(struct urb *urb); | |||
121 | static void ti_bulk_in_callback(struct urb *urb); | 121 | static void ti_bulk_in_callback(struct urb *urb); |
122 | static void ti_bulk_out_callback(struct urb *urb); | 122 | static void ti_bulk_out_callback(struct urb *urb); |
123 | 123 | ||
124 | static void ti_recv(struct device *dev, struct tty_struct *tty, | 124 | static void ti_recv(struct usb_serial_port *port, struct tty_struct *tty, |
125 | unsigned char *data, int length); | 125 | unsigned char *data, int length); |
126 | static void ti_send(struct ti_port *tport); | 126 | static void ti_send(struct ti_port *tport); |
127 | static int ti_set_mcr(struct ti_port *tport, unsigned int mcr); | 127 | static int ti_set_mcr(struct ti_port *tport, unsigned int mcr); |
@@ -1155,8 +1155,7 @@ static void ti_bulk_in_callback(struct urb *urb) | |||
1155 | dev_dbg(dev, "%s - port closed, dropping data\n", | 1155 | dev_dbg(dev, "%s - port closed, dropping data\n", |
1156 | __func__); | 1156 | __func__); |
1157 | else | 1157 | else |
1158 | ti_recv(&urb->dev->dev, tty, | 1158 | ti_recv(port, tty, urb->transfer_buffer, |
1159 | urb->transfer_buffer, | ||
1160 | urb->actual_length); | 1159 | urb->actual_length); |
1161 | spin_lock(&tport->tp_lock); | 1160 | spin_lock(&tport->tp_lock); |
1162 | tport->tp_icount.rx += urb->actual_length; | 1161 | tport->tp_icount.rx += urb->actual_length; |
@@ -1210,15 +1209,15 @@ static void ti_bulk_out_callback(struct urb *urb) | |||
1210 | } | 1209 | } |
1211 | 1210 | ||
1212 | 1211 | ||
1213 | static void ti_recv(struct device *dev, struct tty_struct *tty, | 1212 | static void ti_recv(struct usb_serial_port *port, struct tty_struct *tty, |
1214 | unsigned char *data, int length) | 1213 | unsigned char *data, int length) |
1215 | { | 1214 | { |
1216 | int cnt; | 1215 | int cnt; |
1217 | 1216 | ||
1218 | do { | 1217 | do { |
1219 | cnt = tty_insert_flip_string(tty, data, length); | 1218 | cnt = tty_insert_flip_string(&port->port, data, length); |
1220 | if (cnt < length) { | 1219 | if (cnt < length) { |
1221 | dev_err(dev, "%s - dropping data, %d bytes lost\n", | 1220 | dev_err(&port->dev, "%s - dropping data, %d bytes lost\n", |
1222 | __func__, length - cnt); | 1221 | __func__, length - cnt); |
1223 | if (cnt == 0) | 1222 | if (cnt == 0) |
1224 | break; | 1223 | break; |