From patchwork Wed Aug 4 07:59:11 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 116970 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o7480LIt019101 for ; Wed, 4 Aug 2010 08:00:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756675Ab0HDH7X (ORCPT ); Wed, 4 Aug 2010 03:59:23 -0400 Received: from mail-pz0-f46.google.com ([209.85.210.46]:60589 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756684Ab0HDH7O (ORCPT ); Wed, 4 Aug 2010 03:59:14 -0400 Received: by mail-pz0-f46.google.com with SMTP id 26so1896941pzk.19 for ; Wed, 04 Aug 2010 00:59:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:subject:to:cc:date :message-id:in-reply-to:references:user-agent:mime-version :content-type:content-transfer-encoding; bh=9PQ7cs491z+eKg58COo7Bby6LwVe56araWMG0MNBd0U=; b=YyFFt7Voqd5vBVnRHSuxfiFLSnSJENykqo1uE7iNq2H6UmnJuL1y1x7USU3crazPrU poWMIu8qYLTfFVERCGZ0bRWDZvEjLCW4vG3+zSILPgHsUeKbQTcEkB1xbXIsAOZtX7i7 LxZob6Zvmw4QugW09j/8Baj16biVCMcsJbNEY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:subject:to:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; b=Yl6x6R1RPw1znFWFunPaoMQRGOx1igOLd71HZtXm5Cx8dbLatTXsTgcVHBpEpUhTGo WWFVb9gOibFzPaQdiMBDlRDOQW8xjmA1+bVr4P7VhxCUeMqSJC78SNhgDtKDpsYKm52a eyGJrHN4F1s0oObGxJuWyJYJvKB3vZ8fcdmNo= Received: by 10.142.174.4 with SMTP id w4mr7716100wfe.252.1280908754057; Wed, 04 Aug 2010 00:59:14 -0700 (PDT) Received: from mailhub.coreip.homeip.net (c-24-6-153-206.hsd1.ca.comcast.net [24.6.153.206]) by mx.google.com with ESMTPS id 23sm10253506wfa.22.2010.08.04.00.59.12 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 04 Aug 2010 00:59:13 -0700 (PDT) From: Dmitry Torokhov Subject: [PATCH 3/3] USB: drop tty argument from usb_serial_handle_sysrq_char() To: linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Benjamin Herrenschmidt , David Airlie , David Miller , Fenghua Yu , Greg Kroah-Hartman , Jason Wessel , Martin Schwidefsky , Russell King , Tony Luck Date: Wed, 04 Aug 2010 00:59:11 -0700 Message-ID: <20100804075911.30647.64907.stgit@localhost.localdomain> In-Reply-To: <20100804075602.30647.91462.stgit@localhost.localdomain> References: <20100804075602.30647.91462.stgit@localhost.localdomain> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 04 Aug 2010 08:00:22 +0000 (UTC) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index e298dc4..8aecfe5 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -1827,7 +1827,7 @@ static int ftdi_process_packet(struct tty_struct *tty, if (port->port.console && port->sysrq) { for (i = 0; i < len; i++, ch++) { - if (!usb_serial_handle_sysrq_char(tty, port, *ch)) + if (!usb_serial_handle_sysrq_char(port, *ch)) tty_insert_flip_char(tty, *ch, flag); } } else { diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index 9587c22..dee73b9 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c @@ -338,7 +338,7 @@ void usb_serial_generic_process_read_urb(struct urb *urb) tty_insert_flip_string(tty, ch, urb->actual_length); else { for (i = 0; i < urb->actual_length; i++, ch++) { - if (!usb_serial_handle_sysrq_char(tty, port, *ch)) + if (!usb_serial_handle_sysrq_char(port, *ch)) tty_insert_flip_char(tty, *ch, TTY_NORMAL); } } @@ -443,8 +443,7 @@ void usb_serial_generic_unthrottle(struct tty_struct *tty) EXPORT_SYMBOL_GPL(usb_serial_generic_unthrottle); #ifdef CONFIG_MAGIC_SYSRQ -int usb_serial_handle_sysrq_char(struct tty_struct *tty, - struct usb_serial_port *port, unsigned int ch) +int usb_serial_handle_sysrq_char(struct usb_serial_port *port, unsigned int ch) { if (port->sysrq && port->port.console) { if (ch && time_before(jiffies, port->sysrq)) { diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 6b60018..34ad7b3 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c @@ -788,7 +788,7 @@ static void pl2303_process_read_urb(struct urb *urb) if (port->port.console && port->sysrq) { for (i = 0; i < urb->actual_length; ++i) - if (!usb_serial_handle_sysrq_char(tty, port, data[i])) + if (!usb_serial_handle_sysrq_char(port, data[i])) tty_insert_flip_char(tty, data[i], tty_flag); } else { tty_insert_flip_string_fixed_flag(tty, data, tty_flag, diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 84a4c44..55675b1 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h @@ -342,8 +342,7 @@ extern int usb_serial_generic_submit_read_urb(struct usb_serial_port *port, extern void usb_serial_generic_process_read_urb(struct urb *urb); extern int usb_serial_generic_prepare_write_buffer(struct usb_serial_port *port, void *dest, size_t size); -extern int usb_serial_handle_sysrq_char(struct tty_struct *tty, - struct usb_serial_port *port, +extern int usb_serial_handle_sysrq_char(struct usb_serial_port *port, unsigned int ch); extern int usb_serial_handle_break(struct usb_serial_port *port);