From patchwork Sun Apr 21 12:21:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 10910485 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B6CD3161F for ; Sun, 21 Apr 2019 12:22:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9840E287B5 for ; Sun, 21 Apr 2019 12:22:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7524728818; Sun, 21 Apr 2019 12:22:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 69CA52864A for ; Sun, 21 Apr 2019 12:22:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727412AbfDUMWA (ORCPT ); Sun, 21 Apr 2019 08:22:00 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:40418 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727368AbfDUMV7 (ORCPT ); Sun, 21 Apr 2019 08:21:59 -0400 Received: by mail-lf1-f65.google.com with SMTP id a28so7119954lfo.7 for ; Sun, 21 Apr 2019 05:21:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fAhC/WX+6J0nXpY/NoNtT8XueLyId+XZUjl4jOW+1kg=; b=eCi5Nszj4fFxDFURQjF4NnBSBr6vi9cKfqKpoyBg1gp+JYtAaBN/qVnwmMgR1DdIFc MeHPsAk19MR+FFsHeCzcwzOHgMtiFcLZCxELpstqvUzqh5T3gryvMRFxfhsDOl1LgJkS q2O1vnKjz2f5qTOsgaJzppXMSWTVOj0v2wtfJzLHrO48tn1iss92kjR9XMEBqCgWiRW4 3Y7is3ks/PECpzJShRR0aapeguQdxGtmPKc0emAyI272ANVyvBR46JyQBLtxGSQWUmXV PNgCTvPsiOuhIjLJUQaQyhoImt9BdIxbwre5bhpd8sQpv9c/VCM1BGkt4eY6z8TAfC3q okxA== X-Gm-Message-State: APjAAAWJiKOPFfN5Zs7dT+Vvgvt9s2Eg2wd4YK3/XDyUNDDn/ZHsuXj2 Dyqq0f2arVK7LZcSV8GwjPEo6qCG X-Google-Smtp-Source: APXvYqyWiwqY1BN7fzuSJ1cTvpiShqJ/N39TqXxtNioyNa/6HRLWNlH2i/q3XyAEBk3Cuy45aQceaA== X-Received: by 2002:a19:751a:: with SMTP id y26mr7785744lfe.47.1555849316957; Sun, 21 Apr 2019 05:21:56 -0700 (PDT) Received: from xi.terra (c-74bee655.07-184-6d6c6d4.bbcust.telenor.se. [85.230.190.116]) by smtp.gmail.com with ESMTPSA id v21sm2448520lfg.26.2019.04.21.05.21.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Apr 2019 05:21:55 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.91) (envelope-from ) id 1hIBTs-0006tz-EY; Sun, 21 Apr 2019 14:22:00 +0200 From: Johan Hovold To: linux-usb@vger.kernel.org Cc: Greg Kroah-Hartman , Johan Hovold Subject: [PATCH 4/9] USB: serial: cypress_m8: drop unused termios Date: Sun, 21 Apr 2019 14:21:49 +0200 Message-Id: <20190421122154.26465-5-johan@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190421122154.26465-1-johan@kernel.org> References: <20190421122154.26465-1-johan@kernel.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Drop driver termios structure that held a copy of the tty termios for no good reason. Signed-off-by: Johan Hovold --- drivers/usb/serial/cypress_m8.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index 8a06e5ffe644..f9bbbdd1a148 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c @@ -108,9 +108,6 @@ struct cypress_private { int baud_rate; /* stores current baud rate in integer form */ char prev_status; /* used for TIOCMIWAIT */ - /* we pass a pointer to this as the argument sent to - cypress_set_termios old_termios */ - struct ktermios tmp_termios; /* stores the old termios settings */ }; /* function prototypes for the Cypress USB to serial device */ @@ -603,7 +600,7 @@ static int cypress_open(struct tty_struct *tty, struct usb_serial_port *port) cypress_send(port); if (tty) - cypress_set_termios(tty, port, &priv->tmp_termios); + cypress_set_termios(tty, port, NULL); /* setup the port and start reading from the device */ usb_fill_int_urb(port->interrupt_in_urb, serial->dev, @@ -899,13 +896,6 @@ static void cypress_set_termios(struct tty_struct *tty, cflag = tty->termios.c_cflag; - /* check if there are new settings */ - if (old_termios) { - spin_lock_irqsave(&priv->lock, flags); - priv->tmp_termios = tty->termios; - spin_unlock_irqrestore(&priv->lock, flags); - } - /* set number of data bits, parity, stop bits */ /* when parity is disabled the parity type bit is ignored */