Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933653Ab0BQNa6 (ORCPT ); Wed, 17 Feb 2010 08:30:58 -0500 Received: from earthlight.etchedpixels.co.uk ([81.2.110.250]:38585 "EHLO bob.linux.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933561Ab0BQNaz (ORCPT ); Wed, 17 Feb 2010 08:30:55 -0500 From: Alan Cox Subject: [PATCH 3/5] tty: sort out the request_room handling for whiteheat To: greg@kroah.com, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Date: Wed, 17 Feb 2010 13:06:57 +0000 Message-ID: <20100217130653.16008.3889.stgit@localhost.localdomain> In-Reply-To: <20100217130604.16008.86393.stgit@localhost.localdomain> References: <20100217130604.16008.86393.stgit@localhost.localdomain> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1623 Lines: 47 This driver has its own (surplus) backup queue system which wants removing from the receive overflow logic. Do this at the same time as removing the request_room logic Signed-off-by: Alan Cox --- drivers/usb/serial/whiteheat.c | 18 +++--------------- 1 files changed, 3 insertions(+), 15 deletions(-) diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c index e89e0d5..12ed820 100644 --- a/drivers/usb/serial/whiteheat.c +++ b/drivers/usb/serial/whiteheat.c @@ -1492,21 +1492,9 @@ static void rx_data_softint(struct work_struct *work) wrap = list_entry(tmp, struct whiteheat_urb_wrap, list); urb = wrap->urb; - if (tty && urb->actual_length) { - int len = tty_buffer_request_room(tty, - urb->actual_length); - /* This stuff can go away now I suspect */ - if (unlikely(len < urb->actual_length)) { - spin_lock_irqsave(&info->lock, flags); - list_add(tmp, &info->rx_urb_q); - spin_unlock_irqrestore(&info->lock, flags); - tty_flip_buffer_push(tty); - schedule_work(&info->rx_work); - goto out; - } - tty_insert_flip_string(tty, urb->transfer_buffer, len); - sent += len; - } + if (tty && urb->actual_length) + sent += tty_insert_flip_string(tty, + urb->transfer_buffer, urb->actual_length); urb->dev = port->serial->dev; result = usb_submit_urb(urb, GFP_ATOMIC); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/