diff options
author | Jiri Slaby <jslaby@suse.cz> | 2013-01-03 09:53:02 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-16 01:17:29 -0500 |
commit | 2f69335710884ae6112fc8196ebe29b5cda7b79b (patch) | |
tree | c97bec97e703faace437235d3bcbbf80c078ad21 /drivers/usb/serial | |
parent | 227434f8986c3827a1faedd1feb437acd6285315 (diff) |
TTY: convert more flipping functions
Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty pointer in
many call sites. Only tty_port will be needed and hence no more
tty_port_tty_get calls in those paths.
Now 4 string flipping ones are on turn:
* tty_insert_flip_string_flags
* tty_insert_flip_string_fixed_flag
* tty_prepare_flip_string
* tty_prepare_flip_string_flags
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r-- | drivers/usb/serial/ark3116.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/belkin_sa.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/cypress_m8.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/digi_acceleport.c | 4 | ||||
-rw-r--r-- | drivers/usb/serial/f81232.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/pl2303.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/spcp8x5.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/ssu100.c | 2 |
9 files changed, 10 insertions, 10 deletions
diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c index a88882c0e237..e2d653d00ea2 100644 --- a/drivers/usb/serial/ark3116.c +++ b/drivers/usb/serial/ark3116.c | |||
@@ -705,7 +705,7 @@ static void ark3116_process_read_urb(struct urb *urb) | |||
705 | if (lsr & UART_LSR_OE) | 705 | if (lsr & UART_LSR_OE) |
706 | tty_insert_flip_char(tty, 0, TTY_OVERRUN); | 706 | tty_insert_flip_char(tty, 0, TTY_OVERRUN); |
707 | } | 707 | } |
708 | tty_insert_flip_string_fixed_flag(tty, data, tty_flag, | 708 | tty_insert_flip_string_fixed_flag(&port->port, data, tty_flag, |
709 | urb->actual_length); | 709 | urb->actual_length); |
710 | tty_flip_buffer_push(tty); | 710 | tty_flip_buffer_push(tty); |
711 | tty_kref_put(tty); | 711 | tty_kref_put(tty); |
diff --git a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c index b72a4c166705..a213d1be9462 100644 --- a/drivers/usb/serial/belkin_sa.c +++ b/drivers/usb/serial/belkin_sa.c | |||
@@ -279,7 +279,7 @@ static void belkin_sa_process_read_urb(struct urb *urb) | |||
279 | tty_insert_flip_char(tty, 0, TTY_OVERRUN); | 279 | tty_insert_flip_char(tty, 0, TTY_OVERRUN); |
280 | } | 280 | } |
281 | 281 | ||
282 | tty_insert_flip_string_fixed_flag(tty, data, tty_flag, | 282 | tty_insert_flip_string_fixed_flag(&port->port, data, tty_flag, |
283 | urb->actual_length); | 283 | urb->actual_length); |
284 | tty_flip_buffer_push(tty); | 284 | tty_flip_buffer_push(tty); |
285 | tty_kref_put(tty); | 285 | tty_kref_put(tty); |
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index fd8c35fd452e..ac14e3eb95ea 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c | |||
@@ -1215,7 +1215,7 @@ static void cypress_read_int_callback(struct urb *urb) | |||
1215 | 1215 | ||
1216 | /* process read if there is data other than line status */ | 1216 | /* process read if there is data other than line status */ |
1217 | if (tty && bytes > i) { | 1217 | if (tty && bytes > i) { |
1218 | tty_insert_flip_string_fixed_flag(tty, data + i, | 1218 | tty_insert_flip_string_fixed_flag(&port->port, data + i, |
1219 | tty_flag, bytes - i); | 1219 | tty_flag, bytes - i); |
1220 | tty_flip_buffer_push(tty); | 1220 | tty_flip_buffer_push(tty); |
1221 | } | 1221 | } |
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c index 45d4af62967f..efbc4035410c 100644 --- a/drivers/usb/serial/digi_acceleport.c +++ b/drivers/usb/serial/digi_acceleport.c | |||
@@ -1455,8 +1455,8 @@ static int digi_read_inb_callback(struct urb *urb) | |||
1455 | /* data length is len-1 (one byte of len is port_status) */ | 1455 | /* data length is len-1 (one byte of len is port_status) */ |
1456 | --len; | 1456 | --len; |
1457 | if (len > 0) { | 1457 | if (len > 0) { |
1458 | tty_insert_flip_string_fixed_flag(tty, data, flag, | 1458 | tty_insert_flip_string_fixed_flag(&port->port, data, |
1459 | len); | 1459 | flag, len); |
1460 | tty_flip_buffer_push(tty); | 1460 | tty_flip_buffer_push(tty); |
1461 | } | 1461 | } |
1462 | } | 1462 | } |
diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 6e4eb57d0177..a8c6430bf1b3 100644 --- a/drivers/usb/serial/f81232.c +++ b/drivers/usb/serial/f81232.c | |||
@@ -140,7 +140,7 @@ static void f81232_process_read_urb(struct urb *urb) | |||
140 | if (!usb_serial_handle_sysrq_char(port, data[i])) | 140 | if (!usb_serial_handle_sysrq_char(port, data[i])) |
141 | tty_insert_flip_char(tty, data[i], tty_flag); | 141 | tty_insert_flip_char(tty, data[i], tty_flag); |
142 | } else { | 142 | } else { |
143 | tty_insert_flip_string_fixed_flag(tty, data, tty_flag, | 143 | tty_insert_flip_string_fixed_flag(&port->port, data, tty_flag, |
144 | urb->actual_length); | 144 | urb->actual_length); |
145 | } | 145 | } |
146 | 146 | ||
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 0a373b3ae96a..0416d952a448 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -2032,7 +2032,7 @@ static int ftdi_process_packet(struct tty_struct *tty, | |||
2032 | tty_insert_flip_char(tty, *ch, flag); | 2032 | tty_insert_flip_char(tty, *ch, flag); |
2033 | } | 2033 | } |
2034 | } else { | 2034 | } else { |
2035 | tty_insert_flip_string_fixed_flag(tty, ch, flag, len); | 2035 | tty_insert_flip_string_fixed_flag(&port->port, ch, flag, len); |
2036 | } | 2036 | } |
2037 | 2037 | ||
2038 | return len; | 2038 | return len; |
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 600241901361..86789b0477c5 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c | |||
@@ -812,7 +812,7 @@ static void pl2303_process_read_urb(struct urb *urb) | |||
812 | if (!usb_serial_handle_sysrq_char(port, data[i])) | 812 | if (!usb_serial_handle_sysrq_char(port, data[i])) |
813 | tty_insert_flip_char(tty, data[i], tty_flag); | 813 | tty_insert_flip_char(tty, data[i], tty_flag); |
814 | } else { | 814 | } else { |
815 | tty_insert_flip_string_fixed_flag(tty, data, tty_flag, | 815 | tty_insert_flip_string_fixed_flag(&port->port, data, tty_flag, |
816 | urb->actual_length); | 816 | urb->actual_length); |
817 | } | 817 | } |
818 | 818 | ||
diff --git a/drivers/usb/serial/spcp8x5.c b/drivers/usb/serial/spcp8x5.c index a42536af1256..fa42f1b907d0 100644 --- a/drivers/usb/serial/spcp8x5.c +++ b/drivers/usb/serial/spcp8x5.c | |||
@@ -505,7 +505,7 @@ static void spcp8x5_process_read_urb(struct urb *urb) | |||
505 | priv->line_status & MSR_STATUS_LINE_DCD); | 505 | priv->line_status & MSR_STATUS_LINE_DCD); |
506 | } | 506 | } |
507 | 507 | ||
508 | tty_insert_flip_string_fixed_flag(tty, data, tty_flag, | 508 | tty_insert_flip_string_fixed_flag(&port->port, data, tty_flag, |
509 | urb->actual_length); | 509 | urb->actual_length); |
510 | tty_flip_buffer_push(tty); | 510 | tty_flip_buffer_push(tty); |
511 | tty_kref_put(tty); | 511 | tty_kref_put(tty); |
diff --git a/drivers/usb/serial/ssu100.c b/drivers/usb/serial/ssu100.c index 4543ea350229..37476c6240c2 100644 --- a/drivers/usb/serial/ssu100.c +++ b/drivers/usb/serial/ssu100.c | |||
@@ -617,7 +617,7 @@ static int ssu100_process_packet(struct urb *urb, | |||
617 | tty_insert_flip_char(tty, *ch, flag); | 617 | tty_insert_flip_char(tty, *ch, flag); |
618 | } | 618 | } |
619 | } else | 619 | } else |
620 | tty_insert_flip_string_fixed_flag(tty, ch, flag, len); | 620 | tty_insert_flip_string_fixed_flag(&port->port, ch, flag, len); |
621 | 621 | ||
622 | return len; | 622 | return len; |
623 | } | 623 | } |