[PATCH] usb: bluetty fix old tty buffer using

Jiri Slaby
2005-09-13T00:34:39Z

Fix bluetty, after tty conversion there was an error in compilation.

Generated in 2.6.13-mm3 kernel version.

Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz>
---

bluetty.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/class/bluetty.c b/drivers/usb/class/bluetty.c
--- a/drivers/usb/class/bluetty.c
+++ b/drivers/usb/class/bluetty.c
@@ -794,7 +794,7 @@ static void bluetooth_int_callback (stru
if (packet_size + EVENT_HDR_SIZE == bluetooth->int_packet_pos) {
for (i = 0; i < bluetooth->int_packet_pos; ++i) {
/* if we insert more than TTY_FLIPBUF_SIZE characters, we drop them */
- if (bluetooth->tty->flip.count >= TTY_FLIPBUF_SIZE) {
+ if (!tty_buffer_request_room(bluetooth->tty, 1)) {
tty_flip_buffer_push(bluetooth->tty);
}
tty_insert_flip_char(bluetooth->tty, bluetooth->int_buffer[i], 0);
@@ -922,7 +922,7 @@ static void bluetooth_read_bulk_callback
if (packet_size + ACL_HDR_SIZE == bluetooth->bulk_packet_pos) {
for (i = 0; i < bluetooth->bulk_packet_pos; ++i) {
/* if we insert more than TTY_FLIPBUF_SIZE characters, we drop them. */
- if (bluetooth->tty->flip.count >= TTY_FLIPBUF_SIZE) {
+ if (!tty_buffer_request_room(bluetooth->tty, 1)) {
tty_flip_buffer_push(bluetooth->tty);
}
tty_insert_flip_char(bluetooth->tty, bluetooth->bulk_buffer[i], 0);